X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fscsi%2Fips.c;h=4cdd891781b18f0b819fb758301a2625d76ea6ef;hb=7bbedd521310547ca73cc77adcf61fb85723adc3;hp=47c263e5cd39d355e15b061d6564cd131b47c249;hpb=7f907d7486f2519c2ff1493bfbcdc36dcacd85b7;p=linux-2.6-omap-h63xx.git diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 47c263e5cd3..4cdd891781b 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -133,10 +133,12 @@ /* 6.10.00 - Remove 1G Addressing Limitations */ /* 6.11.xx - Get VersionInfo buffer off the stack ! DDTS 60401 */ /* 6.11.xx - Make Logical Drive Info structure safe for DMA DDTS 60639 */ -/* 7.10.xx - Add highmem_io flag in SCSI Templete for 2.4 kernels */ +/* 7.10.18 - Add highmem_io flag in SCSI Templete for 2.4 kernels */ /* - Fix path/name for scsi_hosts.h include for 2.6 kernels */ /* - Fix sort order of 7k */ /* - Remove 3 unused "inline" functions */ +/* 7.12.xx - Use STATIC functions whereever possible */ +/* - Clean up deprecated MODULE_PARM calls */ /*****************************************************************************/ /* @@ -207,8 +209,8 @@ module_param(ips, charp, 0); /* * DRIVER_VER */ -#define IPS_VERSION_HIGH "7.10" -#define IPS_VERSION_LOW ".18 " +#define IPS_VERSION_HIGH "7.12" +#define IPS_VERSION_LOW ".02 " #if !defined(__i386__) && !defined(__ia64__) && !defined(__x86_64__) #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" @@ -231,9 +233,9 @@ module_param(ips, charp, 0); #endif #define IPS_DMA_DIR(scb) ((!scb->scsi_cmd || ips_is_passthru(scb->scsi_cmd) || \ - SCSI_DATA_NONE == scb->scsi_cmd->sc_data_direction) ? \ + DMA_NONE == scb->scsi_cmd->sc_data_direction) ? \ PCI_DMA_BIDIRECTIONAL : \ - scsi_to_pci_dma_dir(scb->scsi_cmd->sc_data_direction)) + scb->scsi_cmd->sc_data_direction) #ifdef IPS_DEBUG #define METHOD_TRACE(s, i) if (ips_debug >= (i+10)) printk(KERN_NOTICE s "\n"); @@ -819,12 +821,15 @@ ips_eh_abort(Scsi_Cmnd * SC) ips_ha_t *ha; ips_copp_wait_item_t *item; int ret; + unsigned long cpu_flags; + struct Scsi_Host *host; METHOD_TRACE("ips_eh_abort", 1); if (!SC) return (FAILED); + host = SC->device->host; ha = (ips_ha_t *) SC->device->host->hostdata; if (!ha) @@ -833,6 +838,8 @@ ips_eh_abort(Scsi_Cmnd * SC) if (!ha->active) return (FAILED); + IPS_LOCK_SAVE(host->host_lock, cpu_flags); + /* See if the command is on the copp queue */ item = ha->copp_waitlist.head; while ((item) && (item->scsi_cmd != SC)) @@ -851,6 +858,8 @@ ips_eh_abort(Scsi_Cmnd * SC) /* command must have already been sent */ ret = (FAILED); } + + IPS_UNLOCK_RESTORE(host->host_lock, cpu_flags); return ret; } @@ -866,7 +875,7 @@ ips_eh_abort(Scsi_Cmnd * SC) /* */ /****************************************************************************/ static int -ips_eh_reset(Scsi_Cmnd * SC) +__ips_eh_reset(Scsi_Cmnd * SC) { int ret; int i; @@ -1053,6 +1062,18 @@ ips_eh_reset(Scsi_Cmnd * SC) } +static int +ips_eh_reset(Scsi_Cmnd * SC) +{ + int rc; + + spin_lock_irq(SC->device->host->host_lock); + rc = __ips_eh_reset(SC); + spin_unlock_irq(SC->device->host->host_lock); + + return rc; +} + /****************************************************************************/ /* */ /* Routine Name: ips_queue */ @@ -2849,8 +2870,7 @@ ips_next(ips_ha_t * ha, int intr) sg = SC->request_buffer; scb->sg_count = pci_map_sg(ha->pcidev, sg, SC->use_sg, - scsi_to_pci_dma_dir(SC-> - sc_data_direction)); + SC->sc_data_direction); scb->flags |= IPS_SCB_MAP_SG; for (i = 0; i < scb->sg_count; i++) { if (ips_fill_scb_sg_single @@ -2865,8 +2885,7 @@ ips_next(ips_ha_t * ha, int intr) pci_map_single(ha->pcidev, SC->request_buffer, SC->request_bufflen, - scsi_to_pci_dma_dir(SC-> - sc_data_direction)); + SC->sc_data_direction); scb->flags |= IPS_SCB_MAP_SINGLE; ips_fill_scb_sg_single(ha, scb->data_busaddr, scb, 0,