Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64679
b: refs/heads/master
c: 4221d01
h: refs/heads/master
i:
  64677: 3c723bb
  64675: e9ff7f3
  64671: d9d0e65
v: v3
  • Loading branch information
H. Peter Anvin committed Aug 31, 2007
1 parent ea953cf commit 101a354
Show file tree
Hide file tree
Showing 66 changed files with 359 additions and 745 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6db602d447fb6c3aeb020c5dff5219de317f8bb4
refs/heads/master: 4221d014ea04d439e6d1e65951c3b406e7c1b7ab
34 changes: 21 additions & 13 deletions trunk/arch/i386/boot/video-vesa.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static void vesa_store_mode_params_graphics(void);
static int vesa_probe(void)
{
#if defined(CONFIG_VIDEO_VESA) || defined(CONFIG_FIRMWARE_EDID)
u16 ax;
u16 ax, cx, di;
u16 mode;
addr_t mode_ptr;
struct mode_info *mi;
Expand All @@ -39,9 +39,11 @@ static int vesa_probe(void)

vginfo.signature = VBE2_MAGIC;

/* Optimistically assume a VESA BIOS is register-clean... */
ax = 0x4f00;
asm("int $0x10" : "+a" (ax), "=m" (vginfo) : "D" (&vginfo));
di = (size_t)&vginfo;
asm(INT10
: "+a" (ax), "+D" (di), "=m" (vginfo)
: : "ebx", "ecx", "edx", "esi");

if (ax != 0x004f ||
vginfo.signature != VESA_MAGIC ||
Expand All @@ -64,9 +66,11 @@ static int vesa_probe(void)
memset(&vminfo, 0, sizeof vminfo); /* Just in case... */

ax = 0x4f01;
asm("int $0x10"
: "+a" (ax), "=m" (vminfo)
: "c" (mode), "D" (&vminfo));
cx = mode;
di = (size_t)&vminfo;
asm(INT10
: "+a" (ax), "+c" (cx), "+D" (di), "=m" (vminfo)
: : "ebx", "edx", "esi");

if (ax != 0x004f)
continue;
Expand Down Expand Up @@ -102,16 +106,18 @@ static int vesa_probe(void)

static int vesa_set_mode(struct mode_info *mode)
{
u16 ax;
u16 ax, bx, cx, di;
int is_graphic;
u16 vesa_mode = mode->mode - VIDEO_FIRST_VESA;

memset(&vminfo, 0, sizeof vminfo); /* Just in case... */

ax = 0x4f01;
asm("int $0x10"
: "+a" (ax), "=m" (vminfo)
: "c" (vesa_mode), "D" (&vminfo));
cx = vesa_mode;
di = (size_t)&vminfo;
asm(INT10
: "+a" (ax), "+c" (cx), "+D" (di), "=m" (vminfo)
: : "ebx", "edx", "esi");

if (ax != 0x004f)
return -1;
Expand All @@ -129,9 +135,11 @@ static int vesa_set_mode(struct mode_info *mode)


ax = 0x4f02;
asm volatile("int $0x10"
: "+a" (ax)
: "b" (vesa_mode), "D" (0));
bx = vesa_mode;
di = 0;
asm volatile(INT10
: "+a" (ax), "+b" (bx), "+D" (di)
: : "ecx", "edx", "esi");

if (ax != 0x004f)
return -1;
Expand Down
33 changes: 12 additions & 21 deletions trunk/arch/i386/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,45 +100,36 @@ asmlinkage void machine_check(void);
int kstack_depth_to_print = 24;
static unsigned int code_bytes = 64;

static inline int valid_stack_ptr(struct thread_info *tinfo, void *p, unsigned size)
static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
{
return p > (void *)tinfo &&
p <= (void *)tinfo + THREAD_SIZE - size;
p < (void *)tinfo + THREAD_SIZE - 3;
}

/* The form of the top of the frame on the stack */
struct stack_frame {
struct stack_frame *next_frame;
unsigned long return_address;
};

static inline unsigned long print_context_stack(struct thread_info *tinfo,
unsigned long *stack, unsigned long ebp,
struct stacktrace_ops *ops, void *data)
{
#ifdef CONFIG_FRAME_POINTER
struct stack_frame *frame = (struct stack_frame *)ebp;
while (valid_stack_ptr(tinfo, frame, sizeof(*frame))) {
struct stack_frame *next;
unsigned long addr;
unsigned long addr;

addr = frame->return_address;
#ifdef CONFIG_FRAME_POINTER
while (valid_stack_ptr(tinfo, (void *)ebp)) {
unsigned long new_ebp;
addr = *(unsigned long *)(ebp + 4);
ops->address(data, addr);
/*
* break out of recursive entries (such as
* end_of_stack_stop_unwind_function). Also,
* we can never allow a frame pointer to
* move downwards!
*/
next = frame->next_frame;
if (next <= frame)
*/
new_ebp = *(unsigned long *)ebp;
if (new_ebp <= ebp)
break;
frame = next;
ebp = new_ebp;
}
#else
while (valid_stack_ptr(tinfo, stack, sizeof(*stack))) {
unsigned long addr;

while (valid_stack_ptr(tinfo, stack)) {
addr = *stack++;
if (__kernel_text_address(addr))
ops->address(data, addr);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/ata_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <linux/libata.h>

#define DRV_NAME "ata_generic"
#define DRV_VERSION "0.2.13"
#define DRV_VERSION "0.2.12"

/*
* A generic parallel ATA driver using libata
Expand Down
72 changes: 1 addition & 71 deletions trunk/drivers/ata/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
#include <linux/dmi.h>

#define DRV_NAME "ata_piix"
#define DRV_VERSION "2.12"
#define DRV_VERSION "2.11"

enum {
PIIX_IOCFG = 0x54, /* IDE I/O configuration register */
Expand Down Expand Up @@ -130,7 +130,6 @@ enum {
ich6m_sata_ahci = 8,
ich8_sata_ahci = 9,
piix_pata_mwdma = 10, /* PIIX3 MWDMA only */
tolapai_sata_ahci = 11,

/* constants for mapping table */
P0 = 0, /* port 0 */
Expand Down Expand Up @@ -254,8 +253,6 @@ static const struct pci_device_id piix_pci_tbl[] = {
{ 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
/* SATA Controller IDE (ICH9M) */
{ 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
/* SATA Controller IDE (Tolapai) */
{ 0x8086, 0x5028, PCI_ANY_ID, PCI_ANY_ID, 0, 0, tolapai_sata_ahci },

{ } /* terminate list */
};
Expand Down Expand Up @@ -444,25 +441,12 @@ static const struct piix_map_db ich8_map_db = {
},
};

static const struct piix_map_db tolapai_map_db = {
.mask = 0x3,
.port_enable = 0x3,
.map = {
/* PM PS SM SS MAP */
{ P0, NA, P1, NA }, /* 00b */
{ RV, RV, RV, RV }, /* 01b */
{ RV, RV, RV, RV }, /* 10b */
{ RV, RV, RV, RV },
},
};

static const struct piix_map_db *piix_map_db_table[] = {
[ich5_sata] = &ich5_map_db,
[ich6_sata] = &ich6_map_db,
[ich6_sata_ahci] = &ich6_map_db,
[ich6m_sata_ahci] = &ich6m_map_db,
[ich8_sata_ahci] = &ich8_map_db,
[tolapai_sata_ahci] = &tolapai_map_db,
};

static struct ata_port_info piix_port_info[] = {
Expand Down Expand Up @@ -576,17 +560,6 @@ static struct ata_port_info piix_port_info[] = {
.mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */
.port_ops = &piix_pata_ops,
},

/* tolapai_sata_ahci: 11: */
{
.sht = &piix_sht,
.flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR |
PIIX_FLAG_AHCI,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = ATA_UDMA6,
.port_ops = &piix_sata_ops,
},
};

static struct pci_bits piix_enable_bits[] = {
Expand Down Expand Up @@ -934,13 +907,6 @@ static int piix_broken_suspend(void)
DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M7"),
},
},
{
.ident = "Satellite U200",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U200"),
},
},
{
.ident = "Satellite U205",
.matches = {
Expand Down Expand Up @@ -1173,39 +1139,6 @@ static void __devinit piix_init_sata_map(struct pci_dev *pdev,
hpriv->map = map;
}

static void piix_iocfg_bit18_quirk(struct pci_dev *pdev)
{
static struct dmi_system_id sysids[] = {
{
/* Clevo M570U sets IOCFG bit 18 if the cdrom
* isn't used to boot the system which
* disables the channel.
*/
.ident = "M570U",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Clevo Co."),
DMI_MATCH(DMI_PRODUCT_NAME, "M570U"),
},
},
};
u32 iocfg;

if (!dmi_check_system(sysids))
return;

/* The datasheet says that bit 18 is NOOP but certain systems
* seem to use it to disable a channel. Clear the bit on the
* affected systems.
*/
pci_read_config_dword(pdev, PIIX_IOCFG, &iocfg);
if (iocfg & (1 << 18)) {
dev_printk(KERN_INFO, &pdev->dev,
"applying IOCFG bit18 quirk\n");
iocfg &= ~(1 << 18);
pci_write_config_dword(pdev, PIIX_IOCFG, iocfg);
}
}

/**
* piix_init_one - Register PIIX ATA PCI device with kernel services
* @pdev: PCI device to register
Expand Down Expand Up @@ -1267,9 +1200,6 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
piix_map_db_table[ent->driver_data]);
}

/* apply IOCFG bit18 quirk */
piix_iocfg_bit18_quirk(pdev);

/* On ICH5, some BIOSen disable the interrupt using the
* PCI_COMMAND_INTX_DISABLE bit added in PCI 2.3.
* On ICH6, this bit has the same effect, but only when
Expand Down
16 changes: 3 additions & 13 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1911,9 +1911,8 @@ int ata_dev_configure(struct ata_device *dev)
dev->flags |= ATA_DFLAG_FLUSH_EXT;
}

if (!(dev->horkage & ATA_HORKAGE_BROKEN_HPA) &&
ata_id_hpa_enabled(dev->id))
dev->n_sectors = ata_hpa_resize(dev);
if (ata_id_hpa_enabled(dev->id))
dev->n_sectors = ata_hpa_resize(dev);

/* config NCQ */
ata_dev_config_ncq(dev, ncq_desc, sizeof(ncq_desc));
Expand Down Expand Up @@ -3796,11 +3795,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "ST9160821AS", "3.CLF", ATA_HORKAGE_NONCQ, },
{ "SAMSUNG HD401LJ", "ZZ100-15", ATA_HORKAGE_NONCQ, },

/* devices which puke on READ_NATIVE_MAX */
{ "HDS724040KLSA80", "KFAOA20N", ATA_HORKAGE_BROKEN_HPA, },
{ "WDC WD3200JD-00KLB0", "WD-WCAMR1130137", ATA_HORKAGE_BROKEN_HPA },
{ "WDC WD2500JD-00HBB0", "WD-WMAL71490727", ATA_HORKAGE_BROKEN_HPA },
{ "MAXTOR 6L080L4", "A93.0500", ATA_HORKAGE_BROKEN_HPA },
/* Devices with NCQ limits */

/* End Marker */
{ }
Expand Down Expand Up @@ -3990,11 +3985,6 @@ static unsigned int ata_dev_init_params(struct ata_device *dev,
tf.device |= (heads - 1) & 0x0f; /* max head = num. of heads - 1 */

err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0);
/* A clean abort indicates an original or just out of spec drive
and we should continue as we issue the setup based on the
drive reported working geometry */
if (err_mask == AC_ERR_DEV && (tf.feature & ATA_ABORTED))
err_mask = 0;

DPRINTK("EXIT, err_mask=%x\n", err_mask);
return err_mask;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/pata_ali.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <linux/dmi.h>

#define DRV_NAME "pata_ali"
#define DRV_VERSION "0.7.5"
#define DRV_VERSION "0.7.4"

/*
* Cable special cases
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/pata_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <linux/libata.h>

#define DRV_NAME "pata_amd"
#define DRV_VERSION "0.3.9"
#define DRV_VERSION "0.3.8"

/**
* timing_setup - shared timing computation and load
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/pata_atiixp.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <linux/libata.h>

#define DRV_NAME "pata_atiixp"
#define DRV_VERSION "0.4.6"
#define DRV_VERSION "0.4.5"

enum {
ATIIXP_IDE_PIO_TIMING = 0x40,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/pata_cs5520.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include <linux/libata.h>

#define DRV_NAME "pata_cs5520"
#define DRV_VERSION "0.6.6"
#define DRV_VERSION "0.6.5"

struct pio_clocks
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/pata_cs5530.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <linux/dmi.h>

#define DRV_NAME "pata_cs5530"
#define DRV_VERSION "0.7.4"
#define DRV_VERSION "0.7.3"

static void __iomem *cs5530_port_base(struct ata_port *ap)
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/pata_isapnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <linux/libata.h>

#define DRV_NAME "pata_isapnp"
#define DRV_VERSION "0.2.2"
#define DRV_VERSION "0.2.1"

static struct scsi_host_template isapnp_sht = {
.module = THIS_MODULE,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/pata_it821x.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@


#define DRV_NAME "pata_it821x"
#define DRV_VERSION "0.3.8"
#define DRV_VERSION "0.3.7"

struct it821x_dev
{
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/ata/pata_marvell.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *i

static const struct pci_device_id marvell_pci_tbl[] = {
{ PCI_DEVICE(0x11AB, 0x6101), },
{ PCI_DEVICE(0x11AB, 0x6121), },
{ PCI_DEVICE(0x11AB, 0x6123), },
{ PCI_DEVICE(0x11AB, 0x6145), },
{ } /* terminate list */
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/pata_mpc52xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


#define DRV_NAME "mpc52xx_ata"
#define DRV_VERSION "0.1.2"
#define DRV_VERSION "0.1.0ac2"


/* Private structures used by the driver */
Expand Down
Loading

0 comments on commit 101a354

Please sign in to comment.