diff options
Diffstat (limited to 'drivers/scsi/aha1740.c')
| -rw-r--r-- | drivers/scsi/aha1740.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c index bad35ffc015d..b234621f6b37 100644 --- a/drivers/scsi/aha1740.c +++ b/drivers/scsi/aha1740.c @@ -55,8 +55,12 @@ #include <asm/dma.h> #include <asm/io.h> -#include "scsi.h" +#include <scsi/scsi.h> +#include <scsi/scsi_cmnd.h> +#include <scsi/scsi_device.h> +#include <scsi/scsi_eh.h> #include <scsi/scsi_host.h> +#include <scsi/scsi_tcq.h> #include "aha1740.h" /* IF YOU ARE HAVING PROBLEMS WITH THIS DRIVER, AND WANT TO WATCH @@ -152,6 +156,7 @@ static int aha1740_makecode(unchar *sense, unchar *status) retval=DID_ERROR; /* It's an Overrun */ /* If not overrun, assume underrun and * ignore it! */ + break; case 0x00: /* No info, assume no error, should * not occur */ break; @@ -207,11 +212,11 @@ static int aha1740_test_port(unsigned int base) static irqreturn_t aha1740_intr_handle(int irq, void *dev_id) { struct Scsi_Host *host = (struct Scsi_Host *) dev_id; - void (*my_done)(Scsi_Cmnd *); + void (*my_done)(struct scsi_cmnd *); int errstatus, adapstat; int number_serviced; struct ecb *ecbptr; - Scsi_Cmnd *SCtmp; + struct scsi_cmnd *SCtmp; unsigned int base; unsigned long flags; int handled = 0; @@ -266,8 +271,11 @@ static irqreturn_t aha1740_intr_handle(int irq, void *dev_id) guarantee that we will still have it in the cdb when we come back */ if ( (adapstat & G2INTST_MASK) == G2INTST_CCBERROR ) { - memcpy(SCtmp->sense_buffer, ecbptr->sense, - SCSI_SENSE_BUFFERSIZE); + memcpy_and_pad(SCtmp->sense_buffer, + SCSI_SENSE_BUFFERSIZE, + ecbptr->sense, + sizeof(ecbptr->sense), + 0); errstatus = aha1740_makecode(ecbptr->sense,ecbptr->status); } else errstatus = 0; @@ -311,8 +319,9 @@ static irqreturn_t aha1740_intr_handle(int irq, void *dev_id) return IRQ_RETVAL(handled); } -static int aha1740_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)) +static int aha1740_queuecommand_lck(struct scsi_cmnd *SCpnt) { + void (*done)(struct scsi_cmnd *) = scsi_done; unchar direction; unchar *cmd = (unchar *) SCpnt->cmnd; unchar target = scmd_id(SCpnt); @@ -501,7 +510,7 @@ static void aha1740_getconfig(unsigned int base, unsigned int *irq_level, } static int aha1740_biosparam(struct scsi_device *sdev, - struct block_device *dev, + struct gendisk *unused, sector_t capacity, int* ip) { int size = capacity; @@ -520,7 +529,7 @@ static int aha1740_biosparam(struct scsi_device *sdev, return 0; } -static int aha1740_eh_abort_handler (Scsi_Cmnd *dummy) +static int aha1740_eh_abort_handler (struct scsi_cmnd *dummy) { /* * From Alan Cox : @@ -534,7 +543,7 @@ static int aha1740_eh_abort_handler (Scsi_Cmnd *dummy) return SUCCESS; } -static struct scsi_host_template aha1740_template = { +static const struct scsi_host_template aha1740_template = { .module = THIS_MODULE, .proc_name = "aha1740", .show_info = aha1740_show_info, @@ -544,7 +553,6 @@ static struct scsi_host_template aha1740_template = { .can_queue = AHA1740_ECBS, .this_id = 7, .sg_tablesize = AHA1740_SCATTER, - .use_clustering = ENABLE_CLUSTERING, .eh_abort_handler = aha1740_eh_abort_handler, }; @@ -592,7 +600,6 @@ static int aha1740_probe (struct device *dev) DMA_BIDIRECTIONAL); if (!host->ecb_dma_addr) { printk (KERN_ERR "aha1740_probe: Couldn't map ECB, giving up\n"); - scsi_unregister (shpnt); goto err_host_put; } @@ -674,4 +681,5 @@ static __exit void aha1740_exit (void) module_init (aha1740_init); module_exit (aha1740_exit); +MODULE_DESCRIPTION("Adaptec AHA1740 SCSI host adapter driver"); MODULE_LICENSE("GPL"); |
