Commit 80edba61 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/net-2.5

into home.osdl.org:/home/torvalds/v2.5/linux
parents be2153ef d475450e
...@@ -615,8 +615,8 @@ static int cp_rx_poll (struct net_device *dev, int *budget) ...@@ -615,8 +615,8 @@ static int cp_rx_poll (struct net_device *dev, int *budget)
if (cpr16(IntrStatus) & cp_rx_intr_mask) if (cpr16(IntrStatus) & cp_rx_intr_mask)
goto rx_status_loop; goto rx_status_loop;
cpw16_f(IntrMask, cp_intr_mask);
netif_rx_complete(dev); netif_rx_complete(dev);
cpw16_f(IntrMask, cp_intr_mask);
return 0; /* done */ return 0; /* done */
} }
......
...@@ -457,7 +457,7 @@ config SCSI_SATA_VIA ...@@ -457,7 +457,7 @@ config SCSI_SATA_VIA
config SCSI_BUSLOGIC config SCSI_BUSLOGIC
tristate "BusLogic SCSI support" tristate "BusLogic SCSI support"
depends on (PCI || ISA) && SCSI depends on (PCI || ISA || MCA) && SCSI
---help--- ---help---
This is support for BusLogic MultiMaster and FlashPoint SCSI Host This is support for BusLogic MultiMaster and FlashPoint SCSI Host
Adapters. Consult the SCSI-HOWTO, available from Adapters. Consult the SCSI-HOWTO, available from
......
...@@ -117,6 +117,9 @@ static struct ata_port_operations piix_pata_ops = { ...@@ -117,6 +117,9 @@ static struct ata_port_operations piix_pata_ops = {
.eng_timeout = ata_eng_timeout, .eng_timeout = ata_eng_timeout,
.irq_handler = ata_interrupt, .irq_handler = ata_interrupt,
.port_start = ata_port_start,
.port_stop = ata_port_stop,
}; };
static struct ata_port_operations piix_sata_ops = { static struct ata_port_operations piix_sata_ops = {
...@@ -137,6 +140,9 @@ static struct ata_port_operations piix_sata_ops = { ...@@ -137,6 +140,9 @@ static struct ata_port_operations piix_sata_ops = {
.eng_timeout = ata_eng_timeout, .eng_timeout = ata_eng_timeout,
.irq_handler = ata_interrupt, .irq_handler = ata_interrupt,
.port_start = ata_port_start,
.port_stop = ata_port_stop,
}; };
static struct ata_port_info piix_port_info[] = { static struct ata_port_info piix_port_info[] = {
......
...@@ -915,15 +915,15 @@ scsi_show_extd_sense(unsigned char asc, unsigned char ascq) { ...@@ -915,15 +915,15 @@ scsi_show_extd_sense(unsigned char asc, unsigned char ascq) {
/* Print sense information */ /* Print sense information */
static void static void
print_sense_internal(const char * devclass, print_sense_internal(const char *devclass,
const unsigned char * sense_buffer, const unsigned char *sense_buffer,
struct request *req) struct request *req)
{ {
int s, sense_class, valid, code, info; int s, sense_class, valid, code, info;
const char * error = NULL; const char *error = NULL;
unsigned char asc, ascq; unsigned char asc, ascq;
const char *sense_txt; const char *sense_txt;
char *name = req->rq_disk ? req->rq_disk->disk_name : "?"; const char *name = req->rq_disk ? req->rq_disk->disk_name : devclass;
sense_class = (sense_buffer[0] >> 4) & 0x07; sense_class = (sense_buffer[0] >> 4) & 0x07;
code = sense_buffer[0] & 0xf; code = sense_buffer[0] & 0xf;
...@@ -966,11 +966,9 @@ print_sense_internal(const char * devclass, ...@@ -966,11 +966,9 @@ print_sense_internal(const char * devclass,
sense_txt = scsi_sense_key_string(sense_buffer[2]); sense_txt = scsi_sense_key_string(sense_buffer[2]);
if (sense_txt) if (sense_txt)
printk("%s%s: sense key %s\n", printk("%s: sense key %s\n", name, sense_txt);
devclass, name, sense_txt);
else else
printk("%s%s: sense = %2x %2x\n", printk("%s: sense = %2x %2x\n", name,
devclass, name,
sense_buffer[0], sense_buffer[2]); sense_buffer[0], sense_buffer[2]);
asc = ascq = 0; asc = ascq = 0;
...@@ -993,11 +991,9 @@ print_sense_internal(const char * devclass, ...@@ -993,11 +991,9 @@ print_sense_internal(const char * devclass,
sense_txt = scsi_sense_key_string(sense_buffer[0]); sense_txt = scsi_sense_key_string(sense_buffer[0]);
if (sense_txt) if (sense_txt)
printk("%s%s: old sense key %s\n", printk("%s: old sense key %s\n", name, sense_txt);
devclass, name, sense_txt);
else else
printk("%s%s: sense = %2x %2x\n", printk("%s: sense = %2x %2x\n", name,
devclass, name,
sense_buffer[0], sense_buffer[2]); sense_buffer[0], sense_buffer[2]);
printk("Non-extended sense class %d code 0x%0x\n", printk("Non-extended sense class %d code 0x%0x\n",
......
...@@ -1058,10 +1058,12 @@ void sata_phy_reset(struct ata_port *ap) ...@@ -1058,10 +1058,12 @@ void sata_phy_reset(struct ata_port *ap)
u32 sstatus; u32 sstatus;
unsigned long timeout = jiffies + (HZ * 5); unsigned long timeout = jiffies + (HZ * 5);
if (ap->flags & ATA_FLAG_SATA_RESET) {
scr_write(ap, SCR_CONTROL, 0x301); /* issue phy wake/reset */ scr_write(ap, SCR_CONTROL, 0x301); /* issue phy wake/reset */
scr_read(ap, SCR_CONTROL); /* dummy read; flush */ scr_read(ap, SCR_STATUS); /* dummy read; flush */
udelay(400); /* FIXME: a guess */ udelay(400); /* FIXME: a guess */
scr_write(ap, SCR_CONTROL, 0x300); /* issue phy wake/reset */ }
scr_write(ap, SCR_CONTROL, 0x300); /* issue phy wake/clear reset */
/* wait for phy to become ready, if necessary */ /* wait for phy to become ready, if necessary */
do { do {
...@@ -1084,6 +1086,11 @@ void sata_phy_reset(struct ata_port *ap) ...@@ -1084,6 +1086,11 @@ void sata_phy_reset(struct ata_port *ap)
if (ap->flags & ATA_FLAG_PORT_DISABLED) if (ap->flags & ATA_FLAG_PORT_DISABLED)
return; return;
if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) {
ata_port_disable(ap);
return;
}
ata_bus_reset(ap); ata_bus_reset(ap);
} }
...@@ -1337,9 +1344,13 @@ void ata_bus_reset(struct ata_port *ap) ...@@ -1337,9 +1344,13 @@ void ata_bus_reset(struct ata_port *ap)
outb(ap->ctl, ioaddr->ctl_addr); outb(ap->ctl, ioaddr->ctl_addr);
/* determine if device 0/1 are present */ /* determine if device 0/1 are present */
if (ap->flags & ATA_FLAG_SATA_RESET)
dev0 = 1;
else {
dev0 = ata_dev_devchk(ap, 0); dev0 = ata_dev_devchk(ap, 0);
if (slave_possible) if (slave_possible)
dev1 = ata_dev_devchk(ap, 1); dev1 = ata_dev_devchk(ap, 1);
}
if (dev0) if (dev0)
devmask |= (1 << 0); devmask |= (1 << 0);
...@@ -2569,6 +2580,7 @@ static int ata_thread (void *data) ...@@ -2569,6 +2580,7 @@ static int ata_thread (void *data)
printk(KERN_DEBUG "ata%u: thread exiting\n", ap->id); printk(KERN_DEBUG "ata%u: thread exiting\n", ap->id);
ap->thr_pid = -1; ap->thr_pid = -1;
del_timer_sync(&ap->thr_timer);
complete_and_exit (&ap->thr_exited, 0); complete_and_exit (&ap->thr_exited, 0);
} }
...@@ -2664,6 +2676,26 @@ static void atapi_cdb_send(struct ata_port *ap) ...@@ -2664,6 +2676,26 @@ static void atapi_cdb_send(struct ata_port *ap)
goto out; goto out;
} }
int ata_port_start (struct ata_port *ap)
{
struct pci_dev *pdev = ap->host_set->pdev;
ap->prd = pci_alloc_consistent(pdev, ATA_PRD_TBL_SZ, &ap->prd_dma);
if (!ap->prd)
return -ENOMEM;
DPRINTK("prd alloc, virt %p, dma %x\n", ap->prd, ap->prd_dma);
return 0;
}
void ata_port_stop (struct ata_port *ap)
{
struct pci_dev *pdev = ap->host_set->pdev;
pci_free_consistent(pdev, ATA_PRD_TBL_SZ, ap->prd, ap->prd_dma);
}
/** /**
* ata_host_remove - * ata_host_remove -
* @ap: * @ap:
...@@ -2683,7 +2715,7 @@ static void ata_host_remove(struct ata_port *ap, unsigned int do_unregister) ...@@ -2683,7 +2715,7 @@ static void ata_host_remove(struct ata_port *ap, unsigned int do_unregister)
ata_thread_kill(ap); /* FIXME: check return val */ ata_thread_kill(ap); /* FIXME: check return val */
pci_free_consistent(ap->host_set->pdev, ATA_PRD_TBL_SZ, ap->prd, ap->prd_dma); ap->ops->port_stop(ap);
} }
/** /**
...@@ -2764,9 +2796,9 @@ static struct ata_port * ata_host_add(struct ata_probe_ent *ent, ...@@ -2764,9 +2796,9 @@ static struct ata_port * ata_host_add(struct ata_probe_ent *ent,
struct ata_host_set *host_set, struct ata_host_set *host_set,
unsigned int port_no) unsigned int port_no)
{ {
struct pci_dev *pdev = ent->pdev;
struct Scsi_Host *host; struct Scsi_Host *host;
struct ata_port *ap; struct ata_port *ap;
int rc;
DPRINTK("ENTER\n"); DPRINTK("ENTER\n");
host = scsi_host_alloc(ent->sht, sizeof(struct ata_port)); host = scsi_host_alloc(ent->sht, sizeof(struct ata_port));
...@@ -2777,10 +2809,9 @@ static struct ata_port * ata_host_add(struct ata_probe_ent *ent, ...@@ -2777,10 +2809,9 @@ static struct ata_port * ata_host_add(struct ata_probe_ent *ent,
ata_host_init(ap, host, host_set, ent, port_no); ata_host_init(ap, host, host_set, ent, port_no);
ap->prd = pci_alloc_consistent(pdev, ATA_PRD_TBL_SZ, &ap->prd_dma); rc = ap->ops->port_start(ap);
if (!ap->prd) if (rc)
goto err_out; goto err_out;
DPRINTK("prd alloc, virt %p, dma %x\n", ap->prd, ap->prd_dma);
ap->thr_pid = kernel_thread(ata_thread, ap, CLONE_FS | CLONE_FILES); ap->thr_pid = kernel_thread(ata_thread, ap, CLONE_FS | CLONE_FILES);
if (ap->thr_pid < 0) { if (ap->thr_pid < 0) {
...@@ -2792,7 +2823,7 @@ static struct ata_port * ata_host_add(struct ata_probe_ent *ent, ...@@ -2792,7 +2823,7 @@ static struct ata_port * ata_host_add(struct ata_probe_ent *ent,
return ap; return ap;
err_out_free: err_out_free:
pci_free_consistent(ap->host_set->pdev, ATA_PRD_TBL_SZ, ap->prd, ap->prd_dma); ap->ops->port_stop(ap);
err_out: err_out:
scsi_host_put(host); scsi_host_put(host);
...@@ -2828,6 +2859,7 @@ int ata_device_add(struct ata_probe_ent *ent) ...@@ -2828,6 +2859,7 @@ int ata_device_add(struct ata_probe_ent *ent)
host_set->n_ports = ent->n_ports; host_set->n_ports = ent->n_ports;
host_set->irq = ent->irq; host_set->irq = ent->irq;
host_set->mmio_base = ent->mmio_base; host_set->mmio_base = ent->mmio_base;
host_set->private_data = ent->private_data;
/* register each port bound to this device */ /* register each port bound to this device */
for (i = 0; i < ent->n_ports; i++) { for (i = 0; i < ent->n_ports; i++) {
...@@ -3170,6 +3202,8 @@ void ata_pci_remove_one (struct pci_dev *pdev) ...@@ -3170,6 +3202,8 @@ void ata_pci_remove_one (struct pci_dev *pdev)
free_irq(host_set->irq, host_set); free_irq(host_set->irq, host_set);
if (host_set->mmio_base) if (host_set->mmio_base)
iounmap(host_set->mmio_base); iounmap(host_set->mmio_base);
if (host_set->ports[0]->ops->host_stop)
host_set->ports[0]->ops->host_stop(host_set);
for (i = 0; i < host_set->n_ports; i++) { for (i = 0; i < host_set->n_ports; i++) {
Scsi_Host_Template *sht; Scsi_Host_Template *sht;
...@@ -3274,6 +3308,8 @@ EXPORT_SYMBOL_GPL(ata_check_status_pio); ...@@ -3274,6 +3308,8 @@ EXPORT_SYMBOL_GPL(ata_check_status_pio);
EXPORT_SYMBOL_GPL(ata_check_status_mmio); EXPORT_SYMBOL_GPL(ata_check_status_mmio);
EXPORT_SYMBOL_GPL(ata_exec_command_pio); EXPORT_SYMBOL_GPL(ata_exec_command_pio);
EXPORT_SYMBOL_GPL(ata_exec_command_mmio); EXPORT_SYMBOL_GPL(ata_exec_command_mmio);
EXPORT_SYMBOL_GPL(ata_port_start);
EXPORT_SYMBOL_GPL(ata_port_stop);
EXPORT_SYMBOL_GPL(ata_interrupt); EXPORT_SYMBOL_GPL(ata_interrupt);
EXPORT_SYMBOL_GPL(ata_fill_sg); EXPORT_SYMBOL_GPL(ata_fill_sg);
EXPORT_SYMBOL_GPL(ata_bmdma_start_pio); EXPORT_SYMBOL_GPL(ata_bmdma_start_pio);
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
/* The size of the first scatter/gather segments (determines the maximum block /* The size of the first scatter/gather segments (determines the maximum block
size for SCSI adapters not supporting scatter/gather). The default is set size for SCSI adapters not supporting scatter/gather). The default is set
to try to allocate the buffer as one chunk. */ to try to allocate the buffer as one chunk. */
#define OSST_FIRST_ORDER 5 #define OSST_FIRST_ORDER (15-PAGE_SHIFT)
/* The following lines define defaults for properties that can be set /* The following lines define defaults for properties that can be set
......
This diff is collapsed.
...@@ -106,6 +106,8 @@ static struct ata_port_operations sil_ops = { ...@@ -106,6 +106,8 @@ static struct ata_port_operations sil_ops = {
.irq_handler = ata_interrupt, .irq_handler = ata_interrupt,
.scr_read = sil_scr_read, .scr_read = sil_scr_read,
.scr_write = sil_scr_write, .scr_write = sil_scr_write,
.port_start = ata_port_start,
.port_stop = ata_port_stop,
}; };
static struct ata_port_info sil_port_info[] = { static struct ata_port_info sil_port_info[] = {
......
...@@ -235,6 +235,8 @@ static struct ata_port_operations k2_sata_ops = { ...@@ -235,6 +235,8 @@ static struct ata_port_operations k2_sata_ops = {
.irq_handler = ata_interrupt, .irq_handler = ata_interrupt,
.scr_read = k2_sata_scr_read, .scr_read = k2_sata_scr_read,
.scr_write = k2_sata_scr_write, .scr_write = k2_sata_scr_write,
.port_start = ata_port_start,
.port_stop = ata_port_stop,
}; };
......
...@@ -98,6 +98,9 @@ static struct ata_port_operations svia_sata_ops = { ...@@ -98,6 +98,9 @@ static struct ata_port_operations svia_sata_ops = {
.eng_timeout = ata_eng_timeout, .eng_timeout = ata_eng_timeout,
.irq_handler = ata_interrupt, .irq_handler = ata_interrupt,
.port_start = ata_port_start,
.port_stop = ata_port_stop,
}; };
static struct ata_port_info svia_port_info[] = { static struct ata_port_info svia_port_info[] = {
......
...@@ -207,6 +207,7 @@ struct ata_probe_ent { ...@@ -207,6 +207,7 @@ struct ata_probe_ent {
unsigned int irq_flags; unsigned int irq_flags;
unsigned long host_flags; unsigned long host_flags;
void *mmio_base; void *mmio_base;
void *private_data;
}; };
struct ata_host_set { struct ata_host_set {
...@@ -215,6 +216,7 @@ struct ata_host_set { ...@@ -215,6 +216,7 @@ struct ata_host_set {
unsigned long irq; unsigned long irq;
void *mmio_base; void *mmio_base;
unsigned int n_ports; unsigned int n_ports;
void *private_data;
struct ata_port * ports[0]; struct ata_port * ports[0];
}; };
...@@ -264,6 +266,8 @@ struct ata_queued_cmd { ...@@ -264,6 +266,8 @@ struct ata_queued_cmd {
ata_qc_cb_t callback; ata_qc_cb_t callback;
struct semaphore sem; struct semaphore sem;
void *private_data;
}; };
struct ata_host_stats { struct ata_host_stats {
...@@ -333,6 +337,8 @@ struct ata_port { ...@@ -333,6 +337,8 @@ struct ata_port {
struct semaphore thr_sem; struct semaphore thr_sem;
struct timer_list thr_timer; struct timer_list thr_timer;
unsigned long thr_timeout; unsigned long thr_timeout;
void *private_data;
}; };
struct ata_port_operations { struct ata_port_operations {
...@@ -363,6 +369,11 @@ struct ata_port_operations { ...@@ -363,6 +369,11 @@ struct ata_port_operations {
u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg); u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg);
void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, void (*scr_write) (struct ata_port *ap, unsigned int sc_reg,
u32 val); u32 val);
int (*port_start) (struct ata_port *ap);
void (*port_stop) (struct ata_port *ap);
void (*host_stop) (struct ata_host_set *host_set);
}; };
struct ata_port_info { struct ata_port_info {
...@@ -406,6 +417,8 @@ extern u8 ata_check_status_pio(struct ata_port *ap); ...@@ -406,6 +417,8 @@ extern u8 ata_check_status_pio(struct ata_port *ap);
extern u8 ata_check_status_mmio(struct ata_port *ap); extern u8 ata_check_status_mmio(struct ata_port *ap);
extern void ata_exec_command_pio(struct ata_port *ap, struct ata_taskfile *tf); extern void ata_exec_command_pio(struct ata_port *ap, struct ata_taskfile *tf);
extern void ata_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf); extern void ata_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf);
extern int ata_port_start (struct ata_port *ap);
extern void ata_port_stop (struct ata_port *ap);
extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
extern void ata_fill_sg(struct ata_queued_cmd *qc); extern void ata_fill_sg(struct ata_queued_cmd *qc);
extern void ata_bmdma_start_mmio (struct ata_queued_cmd *qc); extern void ata_bmdma_start_mmio (struct ata_queued_cmd *qc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment