]> git.neil.brown.name Git - history.git/commitdiff
Massive merge by hand for changes duplicated independently
authorJames Bottomley <jejb@mulgrave.(none)>
Mon, 28 Oct 2002 13:06:01 +0000 (07:06 -0600)
committerJames Bottomley <jejb@mulgrave.(none)>
Mon, 28 Oct 2002 13:06:01 +0000 (07:06 -0600)
by Doug Ledford, hch and alan.

46 files changed:
1  2 
arch/ia64/hp/sim/simscsi.c
drivers/ieee1394/sbp2.c
drivers/message/fusion/mptscsih.c
drivers/message/fusion/mptscsih.h
drivers/message/i2o/i2o_scsi.c
drivers/scsi/53c7,8xx.c
drivers/scsi/53c7,8xx.h
drivers/scsi/Config.help
drivers/scsi/Config.in
drivers/scsi/Makefile
drivers/scsi/NCR53c406a.c
drivers/scsi/NCR53c406a.h
drivers/scsi/advansys.c
drivers/scsi/aha1740.c
drivers/scsi/aic7xxx/aic7xxx_linux.c
drivers/scsi/dmx3191d.c
drivers/scsi/dtc.c
drivers/scsi/dtc.h
drivers/scsi/eata.c
drivers/scsi/eata.h
drivers/scsi/eata_pio.c
drivers/scsi/fd_mcs.c
drivers/scsi/fd_mcs.h
drivers/scsi/g_NCR5380.c
drivers/scsi/g_NCR5380.h
drivers/scsi/hosts.c
drivers/scsi/ibmmca.c
drivers/scsi/imm.c
drivers/scsi/in2000.c
drivers/scsi/in2000.h
drivers/scsi/ncr53c8xx.c
drivers/scsi/nsp32.c
drivers/scsi/pas16.c
drivers/scsi/pas16.h
drivers/scsi/ppa.c
drivers/scsi/qlogicfas.c
drivers/scsi/qlogicfas.h
drivers/scsi/seagate.c
drivers/scsi/sym53c416.c
drivers/scsi/sym53c416.h
drivers/scsi/t128.c
drivers/scsi/t128.h
drivers/scsi/u14-34f.c
drivers/scsi/u14-34f.h
drivers/usb/image/hpusbscsi.c
drivers/usb/image/microtek.c

Simple merge
Simple merge
index dd7eea584eae87cd90bdd1ec242d7cc24bfa8d35,85a5bfff797bdadee007aad99dcb30a4bce32038..4c7b63c91adb4ffe7d5795ead610077cbac50d74
@@@ -3669,15 -3667,24 +3669,14 @@@ mptscsih_bios_param(Disk * disk, kdev_
  int
  mptscsih_slave_attach(Scsi_Device *device)
  {
 -      struct Scsi_Host        *host = device->host;
        VirtDevice              *pTarget;
 -      MPT_SCSI_HOST           *hd;
 -      int                      ii, max;
 -
 -      hd = (MPT_SCSI_HOST *)host->hostdata;
 -              if (hd->Targets != NULL) {
 -                      if (hd->is_spi)
 -                              max = MPT_MAX_SCSI_DEVICES;
 -                      else
 -                              max = MPT_MAX_FC_DEVICES<256 ? MPT_MAX_FC_DEVICES : 255;
--
 -                      for (ii=0; ii < max; ii++) {
 -                              pTarget = hd->Targets[ii];
 -                              if (pTarget && !(pTarget->tflags & MPT_TARGET_FLAGS_Q_YES)) {
 -                              scsi_adjust_queue_depth(device, 0, 1);
 -                      }
 -              }
 +      pTarget = device->hostdata;
 +      if (!device->tagged_supported ||
 +          !(pTarget->tflags & MPT_TARGET_FLAGS_Q_YES)) {
 +              scsi_adjust_queue_depth(device, 0, 1);
 +      } else {
 +              scsi_adjust_queue_depth(device, MSG_SIMPLE_TAG,
 +                                             device->host->can_queue >> 1);
        }
        return 0;
  }
index 2877e88fc1e87486fba3fbc4e46df82c93459d11,1ede5feae672525e6821f865950ccae8ef405701..6653cfafc0234df0ca15a3e636b1c38ddc5d893a
@@@ -234,8 -234,8 +235,9 @@@ extern     int              x_scsi_bios_param(Disk *, 
  #else
  extern        int              x_scsi_bios_param(Disk *, kdev_t, int *);
  #endif
 +extern        int              x_scsi_slave_attach(Scsi_Device *);
  extern        void             x_scsi_taskmgmt_bh(void *);
+ extern        int              x_scsi_slave_attach(Scsi_Device *);
  
  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
  #define PROC_SCSI_DECL
  
  #define MPT_SCSIHOST {                                                \
        PROC_SCSI_DECL                                          \
-       name:                           "MPT SCSI Host",        \
-       detect:                         x_scsi_detect,          \
-       release:                        x_scsi_release,         \
-       info:                           x_scsi_info,            \
-       queuecommand:                   x_scsi_queuecommand,    \
-       eh_abort_handler:               x_scsi_abort,           \
-       eh_device_reset_handler:        x_scsi_dev_reset,       \
-       eh_bus_reset_handler:           x_scsi_bus_reset,       \
-       eh_host_reset_handler:          x_scsi_host_reset,      \
-       bios_param:                     x_scsi_bios_param,      \
-       slave_attach:                   x_scsi_slave_attach,    \
-       can_queue:                      MPT_SCSI_CAN_QUEUE,     \
-       this_id:                        -1,                     \
-       sg_tablesize:                   MPT_SCSI_SG_DEPTH,      \
-       max_sectors:                    MPT_SCSI_MAX_SECTORS,   \
-       cmd_per_lun:                    MPT_SCSI_CMD_PER_LUN,   \
-       unchecked_isa_dma:              0,                      \
-       use_clustering:                 ENABLE_CLUSTERING,      \
+       .name                           = "MPT SCSI Host",      \
+       .detect                         = x_scsi_detect,        \
+       .release                        = x_scsi_release,       \
+       .info                           = x_scsi_info,          \
+       .queuecommand                   = x_scsi_queuecommand,  \
+       .slave_attach                   = x_scsi_slave_attach,  \
+       .eh_abort_handler               = x_scsi_abort,         \
+       .eh_device_reset_handler        = x_scsi_dev_reset,     \
+       .eh_bus_reset_handler           = x_scsi_bus_reset,     \
+       .eh_host_reset_handler          = x_scsi_host_reset,    \
+       .bios_param                     = x_scsi_bios_param,    \
+       .can_queue                      = MPT_SCSI_CAN_QUEUE,   \
+       .this_id                        = -1,                   \
+       .sg_tablesize                   = MPT_SCSI_SG_DEPTH,    \
+       .max_sectors                    = MPT_SCSI_MAX_SECTORS, \
+       .cmd_per_lun                    = MPT_SCSI_CMD_PER_LUN, \
+       .use_clustering                 = ENABLE_CLUSTERING,    \
++      .slave_attach                   x_scsi_slave_attach,    \
  }
  
  #else  /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,1) */
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index e8612985a16282573864d48ff6c275f2dff5173f,d8025c6886c446f3a21256a368d11d7662dd38f4..05afe0e71c34045d7cfe9cfbaa65fcd903a8b463
@@@ -695,290 -695,277 +693,278 @@@ static int NCR53c406a_command(Scsi_Cmn
  }
  
  
- int 
- NCR53c406a_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)){
-     int i;
-     unsigned long flags = 0;
+ static int NCR53c406a_queue(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
+ {
+       int i;
+       VDEB(printk("NCR53c406a_queue called\n"));
+       DEB(printk("cmd=%02x, cmd_len=%02x, target=%02x, lun=%02x, bufflen=%d\n", SCpnt->cmnd[0], SCpnt->cmd_len, SCpnt->target, SCpnt->lun, SCpnt->request_bufflen));
  
-     VDEB(printk("NCR53c406a_queue called\n"));
-     DEB(printk("cmd=%02x, cmd_len=%02x, target=%02x, lun=%02x, bufflen=%d\n", 
-                SCpnt->cmnd[0],
-                SCpnt->cmd_len,
-                SCpnt->target, 
-                SCpnt->lun,  
-                SCpnt->request_bufflen));
-     
  #if 0
-     VDEB(for(i=0; i<SCpnt->cmd_len; i++)
-          printk("cmd[%d]=%02x  ", i, SCpnt->cmnd[i]));
-     VDEB(printk("\n"));
+       VDEB(for (i = 0; i < SCpnt->cmd_len; i++)
+            printk("cmd[%d]=%02x  ", i, SCpnt->cmnd[i]));
+       VDEB(printk("\n"));
  #endif
-     
-     current_SC = SCpnt;
-     current_SC->scsi_done = done;
-     current_SC->SCp.phase = command_ph;
-     current_SC->SCp.Status = 0;
-     current_SC->SCp.Message = 0;
-     
-     save_flags(flags);
-     cli();
-     REG0;
-     outb(SCpnt->target, DEST_ID); /* set destination */
-     outb(FLUSH_FIFO, CMD_REG);        /* reset the fifos */
-     
-     for(i=0; i<SCpnt->cmd_len; i++){
-         outb(SCpnt->cmnd[i], SCSI_FIFO);
-     }
-     outb(SELECT_NO_ATN, CMD_REG);
-     restore_flags(flags);
-     
-     rtrc(1);
-     return 0;
+       current_SC = SCpnt;
+       current_SC->scsi_done = done;
+       current_SC->SCp.phase = command_ph;
+       current_SC->SCp.Status = 0;
+       current_SC->SCp.Message = 0;
+       /* We are locked here already by the mid layer */
+       REG0;
+       outb(SCpnt->target, DEST_ID);   /* set destination */
+       outb(FLUSH_FIFO, CMD_REG);      /* reset the fifos */
+       for (i = 0; i < SCpnt->cmd_len; i++) {
+               outb(SCpnt->cmnd[i], SCSI_FIFO);
+       }
+       outb(SELECT_NO_ATN, CMD_REG);
+       rtrc(1);
+       return 0;
+ }
+ static int NCR53c406a_abort(Scsi_Cmnd * SCpnt)
+ {
+       DEB(printk("NCR53c406a_abort called\n"));
+       return FAILED;          /* Don't know how to abort */
+ }
+ static int NCR53c406a_host_reset(Scsi_Cmnd * SCpnt)
+ {
+       DEB(printk("NCR53c406a_reset called\n"));
+       outb(C4_IMG, CONFIG4);  /* Select reg set 0 */
+       outb(CHIP_RESET, CMD_REG);
+       outb(SCSI_NOP, CMD_REG);        /* required after reset */
+       outb(SCSI_RESET, CMD_REG);
+       chip_init();
+       rtrc(2);
+       return SUCCESS;
  }
  
- int
- NCR53c406a_abort(Scsi_Cmnd *SCpnt){
-     DEB(printk("NCR53c406a_abort called\n"));
-     return SCSI_ABORT_SNOOZE; /* Don't know how to abort */
+ static int NCR53c406a_device_reset(Scsi_Cmnd * SCpnt)
+ {
+       return FAILED;
  }
  
- int 
- NCR53c406a_reset(Scsi_Cmnd *SCpnt, unsigned int ignored){
-     DEB(printk("NCR53c406a_reset called\n"));
-     outb(C4_IMG, CONFIG4);      /* Select reg set 0 */
-     outb(CHIP_RESET, CMD_REG);
-     outb(SCSI_NOP, CMD_REG);  /* required after reset */
-     outb(SCSI_RESET, CMD_REG);
-     chip_init();
-     
-     rtrc(2);
-     if (irq_level)
-         return SCSI_RESET_PENDING; /* should get an interrupt */
-     else
-         return SCSI_RESET_WAKEUP; /* won't get any interrupts */
+ static int NCR53c406a_bus_reset(Scsi_Cmnd * SCpnt)
+ {
+       return FAILED;
  }
  
- int 
- NCR53c406a_biosparm(struct scsi_device *sdev, struct block_device *bdev,
-               sector_t capacity, int* info_array){
-     int size;
-     
-     DEB(printk("NCR53c406a_biosparm called\n"));
-     
-     size = capacity;
-     info_array[0] = 64;         /* heads */
-     info_array[1] = 32;         /* sectors */
-     info_array[2] = size>>11;   /* cylinders */
-     if (info_array[2] > 1024) {       /* big disk */
-       info_array[0] = 255;
-       info_array[1] = 63;
-       info_array[2] = size / (255*63);
-     }
-     return 0;
-   }
-      
-      static void
- do_NCR53c406a_intr(int unused, void *dev_id, struct pt_regs *regs){
-     unsigned long flags;
-     struct Scsi_Host * dev = dev_id;
-     
-     spin_lock_irqsave(dev->host_lock, flags);
-     NCR53c406a_intr(0, dev_id, regs);
-     spin_unlock_irqrestore(dev->host_lock, flags);
 -static int NCR53c406a_biosparm(Scsi_Disk * disk, struct block_device *dev, int *info_array)
++static int NCR53c406a_biosparm(Scsi_Disk * disk, struct block_device *dev,
++                             sector_t capacity, int *info_array)
+ {
+       int size;
+       DEB(printk("NCR53c406a_biosparm called\n"));
 -      size = disk->capacity;
++      size = capacity;
+       info_array[0] = 64;     /* heads */
+       info_array[1] = 32;     /* sectors */
+       info_array[2] = size >> 11;     /* cylinders */
+       if (info_array[2] > 1024) {     /* big disk */
+               info_array[0] = 255;
+               info_array[1] = 63;
+               info_array[2] = size / (255 * 63);
+       }
+       return 0;
+ }
+ static void do_NCR53c406a_intr(int unused, void *dev_id, struct pt_regs *regs)
+ {
+       unsigned long flags;
+       struct Scsi_Host *dev = dev_id;
+       spin_lock_irqsave(dev->host_lock, flags);
+       NCR53c406a_intr(0, dev_id, regs);
+       spin_unlock_irqrestore(dev->host_lock, flags);
  }
  
-      static void
- NCR53c406a_intr(int unused, void *dev_id, struct pt_regs *regs){
-     DEB(unsigned char fifo_size;)
-     DEB(unsigned char seq_reg;)
-     unsigned char status, int_reg;
-     unsigned long flags = 0;
+ static void NCR53c406a_intr(int unused, void *dev_id, struct pt_regs *regs)
+ {
+       DEB(unsigned char fifo_size;
+           )
+           DEB(unsigned char seq_reg;
+           )
+       unsigned char status, int_reg;
  #if USE_PIO
-     unsigned char pio_status; 
-     struct scatterlist *sglist;
-     unsigned int sgcount;
+       unsigned char pio_status;
+       struct scatterlist *sglist;
+       unsigned int sgcount;
  #endif
-     
-     VDEB(printk("NCR53c406a_intr called\n"));
-     
-     save_flags(flags);
-     cli();
+       VDEB(printk("NCR53c406a_intr called\n"));
  #if USE_PIO
-     REG1;
-     pio_status = inb(PIO_STATUS);
+       REG1;
+       pio_status = inb(PIO_STATUS);
  #endif
-     REG0;
-     status = inb(STAT_REG);
-     DEB(seq_reg = inb(SEQ_REG));
-     int_reg = inb(INT_REG);
-     DEB(fifo_size = inb(FIFO_FLAGS) & 0x1f);
-     restore_flags(flags);
-     
+       REG0;
+       status = inb(STAT_REG);
+       DEB(seq_reg = inb(SEQ_REG));
+       int_reg = inb(INT_REG);
+       DEB(fifo_size = inb(FIFO_FLAGS) & 0x1f);
  #if NCR53C406A_DEBUG
-     printk("status=%02x, seq_reg=%02x, int_reg=%02x, fifo_size=%02x", 
-            status, seq_reg, int_reg, fifo_size);
+       printk("status=%02x, seq_reg=%02x, int_reg=%02x, fifo_size=%02x", status, seq_reg, int_reg, fifo_size);
  #if (USE_DMA)
-     printk("\n");
+       printk("\n");
  #else
-     printk(", pio=%02x\n", pio_status);
- #endif /* USE_DMA */
- #endif /* NCR53C406A_DEBUG */
-     
-     if(int_reg & 0x80){         /* SCSI reset intr */
-         rtrc(3);
-         DEB(printk("NCR53c406a: reset intr received\n"));
-         current_SC->SCp.phase = idle;
-         current_SC->result = DID_RESET << 16;
-         current_SC->scsi_done(current_SC);
-         return;
-     }
-     
+       printk(", pio=%02x\n", pio_status);
+ #endif                                /* USE_DMA */
+ #endif                                /* NCR53C406A_DEBUG */
+       if (int_reg & 0x80) {   /* SCSI reset intr */
+               rtrc(3);
+               DEB(printk("NCR53c406a: reset intr received\n"));
+               current_SC->SCp.phase = idle;
+               current_SC->result = DID_RESET << 16;
+               current_SC->scsi_done(current_SC);
+               return;
+       }
  #if USE_PIO
-     if(pio_status & 0x80) {
-         printk("NCR53C406A: Warning: PIO error!\n");
-         current_SC->SCp.phase = idle;
-         current_SC->result = DID_ERROR << 16;
-         current_SC->scsi_done(current_SC);
-         return;
-     }
- #endif /* USE_PIO */
-     
-     if(status & 0x20) {               /* Parity error */
-         printk("NCR53c406a: Warning: parity error!\n");
-         current_SC->SCp.phase = idle;
-         current_SC->result = DID_PARITY << 16;
-         current_SC->scsi_done(current_SC);
-         return;
-     }
-     
-     if(status & 0x40) {               /* Gross error */
-         printk("NCR53c406a: Warning: gross error!\n");
-         current_SC->SCp.phase = idle;
-         current_SC->result = DID_ERROR << 16;
-         current_SC->scsi_done(current_SC);
-         return;
-     }
-     
-     if(int_reg & 0x20){               /* Disconnect */
-         DEB(printk("NCR53c406a: disconnect intr received\n"));
-         if(current_SC->SCp.phase != message_in){ /* Unexpected disconnect */
-             current_SC->result = DID_NO_CONNECT << 16;
-         }
-         else{  /* Command complete, return status and message */
-             current_SC->result = (current_SC->SCp.Status & 0xff) 
-                 | ((current_SC->SCp.Message & 0xff) << 8) | (DID_OK << 16);
-         }
-         
-         rtrc(0);
-         current_SC->SCp.phase = idle;
-         current_SC->scsi_done( current_SC );
-         return;
-     }
-     
-     switch(status & 0x07){    /* scsi phase */
-     case 0x00:                        /* DATA-OUT */
-         if(int_reg & 0x10){     /* Target requesting info transfer */
-             rtrc(5);
-             current_SC->SCp.phase = data_out;
-             VDEB(printk("NCR53c406a: Data-Out phase\n"));
-             outb(FLUSH_FIFO, CMD_REG);
-             LOAD_DMA_COUNT(current_SC->request_bufflen); /* Max transfer size */
+       if (pio_status & 0x80) {
+               printk("NCR53C406A: Warning: PIO error!\n");
+               current_SC->SCp.phase = idle;
+               current_SC->result = DID_ERROR << 16;
+               current_SC->scsi_done(current_SC);
+               return;
+       }
+ #endif                                /* USE_PIO */
+       if (status & 0x20) {    /* Parity error */
+               printk("NCR53c406a: Warning: parity error!\n");
+               current_SC->SCp.phase = idle;
+               current_SC->result = DID_PARITY << 16;
+               current_SC->scsi_done(current_SC);
+               return;
+       }
+       if (status & 0x40) {    /* Gross error */
+               printk("NCR53c406a: Warning: gross error!\n");
+               current_SC->SCp.phase = idle;
+               current_SC->result = DID_ERROR << 16;
+               current_SC->scsi_done(current_SC);
+               return;
+       }
+       if (int_reg & 0x20) {   /* Disconnect */
+               DEB(printk("NCR53c406a: disconnect intr received\n"));
+               if (current_SC->SCp.phase != message_in) {      /* Unexpected disconnect */
+                       current_SC->result = DID_NO_CONNECT << 16;
+               } else {        /* Command complete, return status and message */
+                       current_SC->result = (current_SC->SCp.Status & 0xff)
+                           | ((current_SC->SCp.Message & 0xff) << 8) | (DID_OK << 16);
+               }
+               rtrc(0);
+               current_SC->SCp.phase = idle;
+               current_SC->scsi_done(current_SC);
+               return;
+       }
+       switch (status & 0x07) {        /* scsi phase */
+       case 0x00:              /* DATA-OUT */
+               if (int_reg & 0x10) {   /* Target requesting info transfer */
+                       rtrc(5);
+                       current_SC->SCp.phase = data_out;
+                       VDEB(printk("NCR53c406a: Data-Out phase\n"));
+                       outb(FLUSH_FIFO, CMD_REG);
+                       LOAD_DMA_COUNT(current_SC->request_bufflen);    /* Max transfer size */
  #if USE_DMA                   /* No s/g support for DMA */
-             NCR53c406a_dma_write(current_SC->request_buffer, 
-                                  current_SC->request_bufflen);
- #endif /* USE_DMA */
-             outb(TRANSFER_INFO | DMA_OP, CMD_REG); 
+                       NCR53c406a_dma_write(current_SC->request_buffer, current_SC->request_bufflen);
+ #endif                                /* USE_DMA */
+                       outb(TRANSFER_INFO | DMA_OP, CMD_REG);
  #if USE_PIO
-             if (!current_SC->use_sg) /* Don't use scatter-gather */
-                 NCR53c406a_pio_write(current_SC->request_buffer, 
-                                      current_SC->request_bufflen);
-             else {              /* use scatter-gather */
-                 sgcount = current_SC->use_sg;
-                 sglist = current_SC->request_buffer;
-                 while( sgcount-- ) {
-                     NCR53c406a_pio_write(page_address(sglist->page) + sglist->offset, sglist->length);
-                     sglist++;
-                 }
-             }
-             REG0;
- #endif /* USE_PIO */
-         }
-         break;
-         
-     case 0x01:                        /* DATA-IN */
-         if(int_reg & 0x10){     /* Target requesting info transfer */
-             rtrc(6);
-             current_SC->SCp.phase = data_in;
-             VDEB(printk("NCR53c406a: Data-In phase\n"));
-             outb(FLUSH_FIFO, CMD_REG);
-             LOAD_DMA_COUNT(current_SC->request_bufflen); /* Max transfer size */
+                       if (!current_SC->use_sg)        /* Don't use scatter-gather */
+                               NCR53c406a_pio_write(current_SC->request_buffer, current_SC->request_bufflen);
+                       else {  /* use scatter-gather */
+                               sgcount = current_SC->use_sg;
+                               sglist = current_SC->request_buffer;
+                               while (sgcount--) {
+                                       NCR53c406a_pio_write(page_address(sglist->page) + sglist->offset, sglist->length);
+                                       sglist++;
+                               }
+                       }
+                       REG0;
+ #endif                                /* USE_PIO */
+               }
+               break;
+       case 0x01:              /* DATA-IN */
+               if (int_reg & 0x10) {   /* Target requesting info transfer */
+                       rtrc(6);
+                       current_SC->SCp.phase = data_in;
+                       VDEB(printk("NCR53c406a: Data-In phase\n"));
+                       outb(FLUSH_FIFO, CMD_REG);
+                       LOAD_DMA_COUNT(current_SC->request_bufflen);    /* Max transfer size */
  #if USE_DMA                   /* No s/g support for DMA */
-             NCR53c406a_dma_read(current_SC->request_buffer, 
-                                 current_SC->request_bufflen);
- #endif /* USE_DMA */
-             outb(TRANSFER_INFO | DMA_OP, CMD_REG); 
+                       NCR53c406a_dma_read(current_SC->request_buffer, current_SC->request_bufflen);
+ #endif                                /* USE_DMA */
+                       outb(TRANSFER_INFO | DMA_OP, CMD_REG);
  #if USE_PIO
-             if (!current_SC->use_sg) /* Don't use scatter-gather */
-                 NCR53c406a_pio_read(current_SC->request_buffer, 
-                                     current_SC->request_bufflen);
-             else {              /* Use scatter-gather */
-                 sgcount = current_SC->use_sg;
-                 sglist = current_SC->request_buffer;
-                 while( sgcount-- ) {
-                     NCR53c406a_pio_read(page_address(sglist->page) + sglist->offset, sglist->length);
-                     sglist++;
-                 }
-             }
-             REG0;
- #endif /* USE_PIO */
-         }
-         break;
-         
-     case 0x02:                        /* COMMAND */
-         current_SC->SCp.phase = command_ph;
-         printk("NCR53c406a: Warning: Unknown interrupt occurred in command phase!\n");
-         break;
-         
-     case 0x03:                        /* STATUS */
-         rtrc(7);
-         current_SC->SCp.phase = status_ph;
-         VDEB(printk("NCR53c406a: Status phase\n"));
-         outb(FLUSH_FIFO, CMD_REG);
-         outb(INIT_CMD_COMPLETE, CMD_REG);
-         break;
-         
-     case 0x04:                        /* Reserved */
-     case 0x05:                        /* Reserved */
-         printk("NCR53c406a: WARNING: Reserved phase!!!\n");
-         break;
-         
-     case 0x06:                        /* MESSAGE-OUT */
-         DEB(printk("NCR53c406a: Message-Out phase\n"));
-         current_SC->SCp.phase = message_out;
-         outb(SET_ATN, CMD_REG);       /* Reject the message */
-         outb(MSG_ACCEPT, CMD_REG);
-         break;
-         
-     case 0x07:                        /* MESSAGE-IN */
-         rtrc(4);
-         VDEB(printk("NCR53c406a: Message-In phase\n"));
-         current_SC->SCp.phase = message_in;
-         
-         current_SC->SCp.Status = inb(SCSI_FIFO);    
-         current_SC->SCp.Message = inb(SCSI_FIFO);
-         
-         VDEB(printk("SCSI FIFO size=%d\n", inb(FIFO_FLAGS) & 0x1f));
-         DEB(printk("Status = %02x  Message = %02x\n", 
-                    current_SC->SCp.Status, current_SC->SCp.Message));
-         
-         if(current_SC->SCp.Message == SAVE_POINTERS || 
-            current_SC->SCp.Message == DISCONNECT) {
-             outb(SET_ATN, CMD_REG); /* Reject message */
-             DEB(printk("Discarding SAVE_POINTERS message\n"));
-         }
-         outb(MSG_ACCEPT, CMD_REG);
-         break;
-     }
+                       if (!current_SC->use_sg)        /* Don't use scatter-gather */
+                               NCR53c406a_pio_read(current_SC->request_buffer, current_SC->request_bufflen);
+                       else {  /* Use scatter-gather */
+                               sgcount = current_SC->use_sg;
+                               sglist = current_SC->request_buffer;
+                               while (sgcount--) {
+                                       NCR53c406a_pio_read(page_address(sglist->page) + sglist->offset, sglist->length);
+                                       sglist++;
+                               }
+                       }
+                       REG0;
+ #endif                                /* USE_PIO */
+               }
+               break;
+       case 0x02:              /* COMMAND */
+               current_SC->SCp.phase = command_ph;
+               printk("NCR53c406a: Warning: Unknown interrupt occurred in command phase!\n");
+               break;
+       case 0x03:              /* STATUS */
+               rtrc(7);
+               current_SC->SCp.phase = status_ph;
+               VDEB(printk("NCR53c406a: Status phase\n"));
+               outb(FLUSH_FIFO, CMD_REG);
+               outb(INIT_CMD_COMPLETE, CMD_REG);
+               break;
+       case 0x04:              /* Reserved */
+       case 0x05:              /* Reserved */
+               printk("NCR53c406a: WARNING: Reserved phase!!!\n");
+               break;
+       case 0x06:              /* MESSAGE-OUT */
+               DEB(printk("NCR53c406a: Message-Out phase\n"));
+               current_SC->SCp.phase = message_out;
+               outb(SET_ATN, CMD_REG); /* Reject the message */
+               outb(MSG_ACCEPT, CMD_REG);
+               break;
+       case 0x07:              /* MESSAGE-IN */
+               rtrc(4);
+               VDEB(printk("NCR53c406a: Message-In phase\n"));
+               current_SC->SCp.phase = message_in;
+               current_SC->SCp.Status = inb(SCSI_FIFO);
+               current_SC->SCp.Message = inb(SCSI_FIFO);
+               VDEB(printk("SCSI FIFO size=%d\n", inb(FIFO_FLAGS) & 0x1f));
+               DEB(printk("Status = %02x  Message = %02x\n", current_SC->SCp.Status, current_SC->SCp.Message));
+               if (current_SC->SCp.Message == SAVE_POINTERS || current_SC->SCp.Message == DISCONNECT) {
+                       outb(SET_ATN, CMD_REG); /* Reject message */
+                       DEB(printk("Discarding SAVE_POINTERS message\n"));
+               }
+               outb(MSG_ACCEPT, CMD_REG);
+               break;
+       }
  }
  
  #ifndef IRQ_LEV
index d13bfccae395d3a307b46c53e6287a8f7a6f0efe,a29b8f6b61573185d45d8b0b54a96dca3da5eb17..4165056e77d4a1c22539ed9af5f90e487d985982
   * Use SG_NONE if DMA mode is enabled!
   */
  #define NCR53c406a { \
-      proc_name:         "NCR53c406a"          /* proc_name */,        \
-      name:              "NCR53c406a"          /* name */,             \
-      detect:            NCR53c406a_detect     /* detect */,           \
-      info:              NCR53c406a_info               /* info */,             \
-      command:           NCR53c406a_command    /* command */,          \
-      queuecommand:      NCR53c406a_queue      /* queuecommand */,     \
-      abort:             NCR53c406a_abort      /* abort */,            \
-      reset:             NCR53c406a_reset      /* reset */,            \
-      bios_param:        NCR53c406a_biosparm   /* biosparm */,         \
-      can_queue:         1                     /* can_queue */,        \
-      this_id:           7                     /* SCSI ID of the chip */, \
-      sg_tablesize:      32                    /*SG_ALL*/ /*SG_NONE*/, \
-      cmd_per_lun:       1                     /* commands per lun */, \
-      unchecked_isa_dma: 1                     /* unchecked_isa_dma */, \
-      use_clustering:    ENABLE_CLUSTERING                               \
+      proc_name:               "NCR53c406a"            /* proc_name */,        \
+      name:                    "NCR53c406a"            /* name */,             \
+      detect:                  NCR53c406a_detect       /* detect */,           \
+      info:                    NCR53c406a_info         /* info */,             \
+      command:                 NCR53c406a_command      /* command */,          \
+      queuecommand:            NCR53c406a_queue        /* queuecommand */,     \
+      eh_abort_handler:        NCR53c406a_abort        /* abort */,            \
+      eh_bus_reset_handler:      NCR53c406a_bus_reset  /* reset */,            \
+      eh_device_reset_handler:   NCR53c406a_device_reset       /* reset */,            \
+      eh_host_reset_handler:     NCR53c406a_host_reset /* reset */,            \
+      bios_param:              NCR53c406a_biosparm     /* biosparm */,         \
+      can_queue:               1                       /* can_queue */,        \
+      this_id:                 7                       /* SCSI ID of the chip */, \
+      sg_tablesize:            32                      /*SG_ALL*/ /*SG_NONE*/, \
+      cmd_per_lun:             1                       /* commands per lun */, \
+      unchecked_isa_dma:       1                       /* unchecked_isa_dma */, \
+      use_clustering:          ENABLE_CLUSTERING                               \
  }
  
- int NCR53c406a_detect(Scsi_Host_Template *);
- const char* NCR53c406a_info(struct Scsi_Host *);
- int NCR53c406a_command(Scsi_Cmnd *);
- int NCR53c406a_queue(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
- int NCR53c406a_abort(Scsi_Cmnd *);
- int NCR53c406a_reset(Scsi_Cmnd *, unsigned int);
- int NCR53c406a_biosparm(struct scsi_device *, struct block_device *,
-               sector_t capacity, int []);
- #endif /* _NCR53C406A_H */
- /*
-  * Overrides for Emacs so that we get a uniform tabbing style.
-  * Emacs will notice this stuff at the end of the file and automatically
-  * adjust the settings for this buffer only.  This must remain at the end
-  * of the file.
-  * ---------------------------------------------------------------------------
-  * Local variables:
-  * c-indent-level: 4
-  * c-brace-imaginary-offset: 0
-  * c-brace-offset: -4
-  * c-argdecl-indent: 4
-  * c-label-offset: -4
-  * c-continued-statement-offset: 4
-  * c-continued-brace-offset: 0
-  * indent-tabs-mode: nil
-  * tab-width: 8
-  * End:
-  */
+ static int NCR53c406a_detect(Scsi_Host_Template *);
+ static const char *NCR53c406a_info(struct Scsi_Host *);
 -
+ static int NCR53c406a_command(Scsi_Cmnd *);
+ static int NCR53c406a_queue(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
+ static int NCR53c406a_abort(Scsi_Cmnd *);
+ static int NCR53c406a_bus_reset(Scsi_Cmnd *);
+ static int NCR53c406a_device_reset(Scsi_Cmnd *);
+ static int NCR53c406a_host_reset(Scsi_Cmnd *);
 -static int NCR53c406a_biosparm(Disk *, struct block_device *, int[]);
++static int NCR53c406a_biosparm(Disk *, struct block_device *, sector_t, int[]);
+ #endif                                /* _NCR53C406A_H */
Simple merge
Simple merge
Simple merge
Simple merge
index b686b749e9be314b9889e1234ad76ac1bbcee344,980787b95bafcd8a6234530d9bd5300e31b802e5..eccabd9ab3ed2bb5cf9ce1f2925b561c15e0b69c
@@@ -313,15 -323,14 +322,15 @@@ static int __init dtc_detect(Scsi_Host_
   * and matching the H_C_S coordinates to what DOS uses.
  */
  
- int dtc_biosparam(struct scsi_device *sdev, struct block_device *dev,
-               sector_t capacity, int * ip)
 -static int dtc_biosparam(Disk * disk, struct block_device *dev, int *ip)
++static int dtc_biosparam(struct scsi_device *sdev, struct block_device *dev,
++                       sector_t capacity, int *ip)
  {
-    int size = capacity;
 -      int size = disk->capacity;
++      int size = capacity;
  
-    ip[0] = 64;
-    ip[1] = 32;
-    ip[2] = size >> 11;
-    return 0;
+       ip[0] = 64;
+       ip[1] = 32;
+       ip[2] = size >> 11;
+       return 0;
  }
  
  
index 748970cb3ed30eccf52909bf4b699699c01bbf0d,c080f4d55f515792f6c4e4469ff16dbb31e0ab27..3fe23ab04d4a67dc5456d9fe5c00708217d19bad
  #ifndef DTC3280_H
  #define DTC3280_H
  
- #ifndef ASM
- int dtc_abort(Scsi_Cmnd *);
- int dtc_biosparam(struct scsi_device *, struct block_device *,
-               sector_t, int*);
- int dtc_detect(Scsi_Host_Template *);
- int dtc_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
- int dtc_reset(Scsi_Cmnd *, unsigned int reset_flags);
- int dtc_proc_info (char *buffer, char **start, off_t offset,
+ static int dtc_abort(Scsi_Cmnd *);
 -static int dtc_biosparam(Disk *, struct block_device *, int*);
++static int dtc_biosparam(Disk *, struct block_device *,
++                       sector_t, int*);
+ static int dtc_detect(Scsi_Host_Template *);
+ static int dtc_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
+ static int dtc_bus_reset(Scsi_Cmnd *);
+ static int dtc_device_reset(Scsi_Cmnd *);
+ static int dtc_host_reset(Scsi_Cmnd *);
+ static int dtc_proc_info (char *buffer, char **start, off_t offset,
                   int length, int hostno, int inout);
  
- #ifndef NULL
- #define NULL 0
- #endif
  #ifndef CMD_PER_LUN
  #define CMD_PER_LUN 2
  #endif
Simple merge
index 0ae813cda5df6cd83a9b0d9862c96ff5b6a78008,207dafbd8314d15d8700abd5f03979743a468fde..ff2a332c7b04739283aa01333edb1a2db6c4dd21
@@@ -11,11 -11,10 +11,11 @@@ int eata2x_release(struct Scsi_Host *)
  int eata2x_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
  int eata2x_abort(Scsi_Cmnd *);
  int eata2x_reset(Scsi_Cmnd *);
 -int eata2x_biosparam(Disk *, struct block_device *, int *);
 +int eata2x_biosparam(struct scsi_device *, struct block_device *,
 +              sector_t, int *);
  static int eata2x_slave_attach(Scsi_Device *);
  
- #define EATA_VERSION "7.22.00"
+ #define EATA_VERSION "7.70.00"
  
  #define EATA {                                                               \
                  name:              "EATA/DMA 2.0x rev. " EATA_VERSION " ",   \
Simple merge
index 278c2a9aa2e0d9628ded3aa275e7ce8db01728a3,71909634c9f03adadf2a85394bb7c95d7d674532..22e32de5c370c803f180d86e0a372af35953cfce
@@@ -1362,105 -1343,106 +1343,102 @@@ static int fd_mcs_device_reset(Scsi_Cmn
  #endif
  
  #if DEBUG_RESET
-   if (called_once) fd_mcs_print_info( current_SC );
-   called_once = 1;
+               if (called_once)
+                       fd_mcs_print_info(current_SC);
+               called_once = 1;
  #endif
-    
-   outb( 1, SCSI_Cntl_port );
-   do_pause( 2 );
-   outb( 0, SCSI_Cntl_port );
-   do_pause( 115 );
-   outb( 0, SCSI_Mode_Cntl_port );
-   outb( PARITY_MASK, TMC_Cntl_port );
-   /* Unless this is the very first call (i.e., SCPnt == NULL), everything
-      is probably hosed at this point.  We will, however, try to keep
-      things going by informing the high-level code that we need help. */
-   return SCSI_RESET_WAKEUP;
- }
+               spin_lock_irqsave(shpnt->host_lock, flags);
+               outb(1, SCSI_Cntl_port);
+               do_pause(2);
+               outb(0, SCSI_Cntl_port);
+               do_pause(115);
+               outb(0, SCSI_Mode_Cntl_port);
+               outb(PARITY_MASK, TMC_Cntl_port);
+               /* Unless this is the very first call (i.e., SCPnt == NULL), everything
+                  is probably hosed at this point.  We will, however, try to keep
+                  things going by informing the high-level code that we need help. */
+               spin_unlock_irqrestore(shpnt->host_lock, flags);
+               return SUCCESS;
+       }
  
 -#include "sd.h"
  #include <scsi/scsi_ioctl.h>
  
- int fd_mcs_biosparam(struct scsi_device *sdev, struct block_device *bdev,
-               sector_t capacity, int *info_array )
- {
-   unsigned char    buf[512 + sizeof( int ) * 2];
-   int             size      = capacity;
-   int              *sizes    = (int *)buf;
-   unsigned char    *data     = (unsigned char *)(sizes + 2);
-   unsigned char    do_read[] = { READ_6, 0, 0, 0, 1, 0 };
-   int              retcode;
-   /* BIOS >= 3.4 for MCA cards */
-   /* This algorithm was provided by Future Domain (much thanks!). */
-   sizes[0] = 0;               /* zero bytes out */
-   sizes[1] = 512;             /* one sector in */
-   memcpy( data, do_read, sizeof( do_read ) );
-   retcode = kernel_scsi_ioctl(sdev,
-                              SCSI_IOCTL_SEND_COMMAND,
-                              (void *)buf );
-   if (!retcode                                    /* SCSI command ok */
-       && data[511] == 0xaa && data[510] == 0x55 /* Partition table valid */
-       && data[0x1c2]) {                           /* Partition type */
-     /* The partition table layout is as follows:
-        Start: 0x1b3h
-        Offset: 0 = partition status
-        1 = starting head
-        2 = starting sector and cylinder (word, encoded)
-        4 = partition type
-        5 = ending head
-        6 = ending sector and cylinder (word, encoded)
-        8 = starting absolute sector (double word)
-        c = number of sectors (double word)
-        Signature: 0x1fe = 0x55aa
-        So, this algorithm assumes:
-        1) the first partition table is in use,
-        2) the data in the first entry is correct, and
-        3) partitions never divide cylinders
-        Note that (1) may be FALSE for NetBSD (and other BSD flavors),
-        as well as for Linux.  Note also, that Linux doesn't pay any
-        attention to the fields that are used by this algorithm -- it
-        only uses the absolute sector data.  Recent versions of Linux's
-        fdisk(1) will fill this data in correctly, and forthcoming
-        versions will check for consistency.
-        Checking for a non-zero partition type is not part of the
-        Future Domain algorithm, but it seemed to be a reasonable thing
-        to do, especially in the Linux and BSD worlds. */
-     info_array[0] = data[0x1c3] + 1;      /* heads */
-     info_array[1] = data[0x1c4] & 0x3f;           /* sectors */
-   } else {
-     /* Note that this new method guarantees that there will always be
-        less than 1024 cylinders on a platter.  This is good for drives
-        up to approximately 7.85GB (where 1GB = 1024 * 1024 kB). */
-     if ((unsigned int)size >= 0x7e0000U) {
-       info_array[0] = 0xff; /* heads   = 255 */
-       info_array[1] = 0x3f; /* sectors =  63 */
-     } else if ((unsigned int)size >= 0x200000U) {
-       info_array[0] = 0x80; /* heads   = 128 */
-       info_array[1] = 0x3f; /* sectors =  63 */
-     } else {
-       info_array[0] = 0x40; /* heads   =  64 */
-       info_array[1] = 0x20; /* sectors =  32 */
-     }
-   }
-   /* For both methods, compute the cylinders */
-   info_array[2] = (unsigned int)size / (info_array[0] * info_array[1] );
-    
-   return 0;
- }
 -      static int fd_mcs_biosparam(Scsi_Disk * disk, struct block_device *bdev, int *info_array) {
++      static int fd_mcs_biosparam(Scsi_Disk * disk, struct block_device *bdev,
++                                  sector_t capacity, int *info_array) {
+               unsigned char buf[512 + sizeof(int) * 2];
 -              int size = disk->capacity;
++              int size = capacity;
+               int *sizes = (int *) buf;
+               unsigned char *data = (unsigned char *) (sizes + 2);
+               unsigned char do_read[] = { READ_6, 0, 0, 0, 1, 0 };
+               int retcode;
+               /* BIOS >= 3.4 for MCA cards */
+               /* This algorithm was provided by Future Domain (much thanks!). */
+               sizes[0] = 0;   /* zero bytes out */
+               sizes[1] = 512; /* one sector in */
+               memcpy(data, do_read, sizeof(do_read));
+               retcode = kernel_scsi_ioctl(disk->device, SCSI_IOCTL_SEND_COMMAND, (void *) buf);
+               if (!retcode    /* SCSI command ok */
+                   && data[511] == 0xaa && data[510] == 0x55   /* Partition table valid */
+                   && data[0x1c2]) {   /* Partition type */
+                       /* The partition table layout is as follows:
+                          Start: 0x1b3h
+                          Offset: 0 = partition status
+                          1 = starting head
+                          2 = starting sector and cylinder (word, encoded)
+                          4 = partition type
+                          5 = ending head
+                          6 = ending sector and cylinder (word, encoded)
+                          8 = starting absolute sector (double word)
+                          c = number of sectors (double word)
+                          Signature: 0x1fe = 0x55aa
+                          So, this algorithm assumes:
+                          1) the first partition table is in use,
+                          2) the data in the first entry is correct, and
+                          3) partitions never divide cylinders
+                          Note that (1) may be FALSE for NetBSD (and other BSD flavors),
+                          as well as for Linux.  Note also, that Linux doesn't pay any
+                          attention to the fields that are used by this algorithm -- it
+                          only uses the absolute sector data.  Recent versions of Linux's
+                          fdisk(1) will fill this data in correctly, and forthcoming
+                          versions will check for consistency.
+                          Checking for a non-zero partition type is not part of the
+                          Future Domain algorithm, but it seemed to be a reasonable thing
+                          to do, especially in the Linux and BSD worlds. */
+                       info_array[0] = data[0x1c3] + 1;        /* heads */
+                       info_array[1] = data[0x1c4] & 0x3f;     /* sectors */
+               } else {
+                       /* Note that this new method guarantees that there will always be
+                          less than 1024 cylinders on a platter.  This is good for drives
+                          up to approximately 7.85GB (where 1GB = 1024 * 1024 kB). */
+                       if ((unsigned int) size >= 0x7e0000U) {
+                               info_array[0] = 0xff;   /* heads   = 255 */
+                               info_array[1] = 0x3f;   /* sectors =  63 */
+                       } else if ((unsigned int) size >= 0x200000U) {
+                               info_array[0] = 0x80;   /* heads   = 128 */
+                               info_array[1] = 0x3f;   /* sectors =  63 */
+                       } else {
+                               info_array[0] = 0x40;   /* heads   =  64 */
+                               info_array[1] = 0x20;   /* sectors =  32 */
+                       }
+               }
+               /* For both methods, compute the cylinders */
+               info_array[2] = (unsigned int) size / (info_array[0] * info_array[1]);
  
 -
 -              return 0;
 -      }
 -
  /* Eventually this will go into an include file, but this will be later */
- static Scsi_Host_Template driver_template = FD_MCS;
      static Scsi_Host_Template driver_template = FD_MCS;
  
  #include "scsi_module.c"
index 88ee71c61662ac7e70f494aea4b8d709c33a9bdb,a98e6e8fdf45fb56542ecdc0e7ed5ccd649d775b..898af400dd412b475c88152d3d0ab9430e9762a4
  #ifndef _FD_MCS_H
  #define _FD_MCS_H
  
- extern int fd_mcs_detect( Scsi_Host_Template * );
- extern int fd_mcs_release( struct Scsi_Host * );
- extern int fd_mcs_command( Scsi_Cmnd * );
- extern int fd_mcs_abort( Scsi_Cmnd * );
- extern int fd_mcs_reset( Scsi_Cmnd *, unsigned int );
- extern int fd_mcs_queue( Scsi_Cmnd *, void (*done)(Scsi_Cmnd *) );
- extern int fd_mcs_biosparam( struct scsi_device *, struct block_device *,
-               sector_t, int * );
- extern int fd_mcs_proc_info( char *, char **, off_t, int, int, int );
- extern const char *fd_mcs_info(struct Scsi_Host *);
+ static int fd_mcs_detect(Scsi_Host_Template *);
+ static int fd_mcs_release(struct Scsi_Host *);
+ static int fd_mcs_command(Scsi_Cmnd *);
+ static int fd_mcs_abort(Scsi_Cmnd *);
+ static int fd_mcs_bus_reset(Scsi_Cmnd *);
+ static int fd_mcs_device_reset(Scsi_Cmnd *);
+ static int fd_mcs_host_reset(Scsi_Cmnd *);
+ static int fd_mcs_queue(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
 -static int fd_mcs_biosparam(Disk *, struct block_device *, int *);
++static int fd_mcs_biosparam(Disk *, struct block_device *,
++                          sector_t, int *);
+ static int fd_mcs_proc_info(char *, char **, off_t, int, int, int);
+ static const char *fd_mcs_info(struct Scsi_Host *);
  
  #define FD_MCS {\
-                     proc_name:      "fd_mcs",                   \
-                     proc_info:      fd_mcs_proc_info,           \
-                   detect:         fd_mcs_detect,              \
-                   release:        fd_mcs_release,             \
-                   info:           fd_mcs_info,                \
-                   command:        fd_mcs_command,             \
-                   queuecommand:   fd_mcs_queue,               \
-                   abort:          fd_mcs_abort,               \
-                   reset:          fd_mcs_reset,               \
-                   bios_param:     fd_mcs_biosparam,           \
-                   can_queue:      1,                          \
-                   this_id:        7,                          \
-                   sg_tablesize:   64,                         \
-                   cmd_per_lun:    1,                          \
-                   use_clustering: DISABLE_CLUSTERING }
- #endif /* _FD_MCS_H */
+                     proc_name:                        "fd_mcs",               \
+                     proc_info:                        fd_mcs_proc_info,       \
+                   detect:                     fd_mcs_detect,          \
+                   release:                    fd_mcs_release,         \
+                   info:                       fd_mcs_info,            \
+                   command:                    fd_mcs_command,         \
+                   queuecommand:               fd_mcs_queue,           \
+                   eh_abort_handler:           fd_mcs_abort,           \
+                   eh_bus_reset_handler:       fd_mcs_bus_reset,       \
+                   eh_host_reset_handler:      fd_mcs_host_reset,      \
+                   eh_device_reset_handler:    fd_mcs_device_reset,    \
+                   bios_param:                 fd_mcs_biosparam,       \
+                   can_queue:                  1,                      \
+                   this_id:                    7,                      \
+                   sg_tablesize:               64,                     \
+                   cmd_per_lun:                1,                      \
+                   use_clustering:             DISABLE_CLUSTERING      \
+               }
+ #endif                                /* _FD_MCS_H */
Simple merge
index 9012b1740038dc953057140779fc5286e8deb7ce,4195fb2e5d243259c36444694fbaf329b909eff6..4583e585d43f8e656f1f5fc892759e044606f96d
  #endif
  
  #ifndef ASM
- int generic_NCR5380_abort(Scsi_Cmnd *);
- int generic_NCR5380_detect(Scsi_Host_Template *);
- int generic_NCR5380_release_resources(struct Scsi_Host *);
- int generic_NCR5380_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
- int generic_NCR5380_bus_reset(Scsi_Cmnd *);
- int generic_NCR5380_host_reset(Scsi_Cmnd *);
- int generic_NCR5380_device_reset(Scsi_Cmnd *);
- int notyet_generic_proc_info (char *buffer ,char **start, off_t offset,
static int generic_NCR5380_abort(Scsi_Cmnd *);
static int generic_NCR5380_detect(Scsi_Host_Template *);
static int generic_NCR5380_release_resources(struct Scsi_Host *);
static int generic_NCR5380_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
static int generic_NCR5380_bus_reset(Scsi_Cmnd *);
static int generic_NCR5380_host_reset(Scsi_Cmnd *);
static int generic_NCR5380_device_reset(Scsi_Cmnd *);
static int notyet_generic_proc_info (char *buffer ,char **start, off_t offset,
                       int length, int hostno, int inout);
- const char* generic_NCR5380_info(struct Scsi_Host *);
- #ifdef BIOSPARAM
- int generic_NCR5380_biosparam(struct scsi_device *, struct block_device *,
-               sector_t, int *);
- #endif
- int generic_NCR5380_proc_info(char* buffer, char** start, off_t offset, int length, int hostno, int inout);
- #ifndef NULL
- #define NULL 0
- #endif
+ static const char* generic_NCR5380_info(struct Scsi_Host *);
 -static int generic_NCR5380_biosparam(Disk *, struct block_device *, int *);
 -
++static int generic_NCR5380_biosparam(Disk *, struct block_device *, sector_t, int *);
+ static int generic_NCR5380_proc_info(char* buffer, char** start, off_t offset, int length, int hostno, int inout);
  
  #ifndef CMD_PER_LUN
  #define CMD_PER_LUN 2
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index bd80e0505b493948e2f5f2ae2c12d87f771531b7,6053efd379f252b92781667660f76be9174423be..f1e41e16322a6e008fecebc6155fe83d1e95313c
  
  
  #ifndef ASM
- int pas16_abort(Scsi_Cmnd *);
- int pas16_biosparam(struct scsi_device *, struct block_device *,
-               sector_t, int*);
- int pas16_detect(Scsi_Host_Template *);
- int pas16_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
- int pas16_bus_reset(Scsi_Cmnd *);
- int pas16_host_reset(Scsi_Cmnd *);
- int pas16_device_reset(Scsi_Cmnd *);
- int pas16_proc_info (char *buffer ,char **start, off_t offset,
+ static int pas16_abort(Scsi_Cmnd *);
 -static int pas16_biosparam(Disk *, struct block_device *, int*);
++static int pas16_biosparam(struct scsi_device *, struct block_device *,
++                         sector_t, int*);
+ static int pas16_detect(Scsi_Host_Template *);
+ static int pas16_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
+ static int pas16_bus_reset(Scsi_Cmnd *);
+ static int pas16_host_reset(Scsi_Cmnd *);
+ static int pas16_device_reset(Scsi_Cmnd *);
+ static int pas16_proc_info (char *buffer ,char **start, off_t offset,
                     int length, int hostno, int inout);
  
  #ifndef NULL
Simple merge
index 1cf5543f05cff79912bfd77fc7f8d7b149e9fe06,710d6d48006df28b468fd52cc0882e2997f9f0f1..7fe69c39f2128a74c14051c728a90588bf591215
@@@ -649,20 -734,20 +734,22 @@@ err_release_mem
  
  }
  
- /*----------------------------------------------------------------*/
- /* return bios parameters */
- int   qlogicfas_biosparam(struct scsi_device * sdev,
-               struct block_device *dev,
-               sector_t capacity, int ip[])
+ /* 
+  *    Return bios parameters 
+  */
 -int qlogicfas_biosparam(Disk * disk, struct block_device *dev, int ip[])
++int qlogicfas_biosparam(struct scsi_device * disk,
++                      struct block_device *dev,
++                      sector_t capacity, int ip[])
  {
  /* This should mimic the DOS Qlogic driver's behavior exactly */
        ip[0] = 0x40;
        ip[1] = 0x20;
-       ip[2] = (unsigned long)capacity / (ip[0] * ip[1]);
 -      ip[2] = (unsigned long) disk->capacity / (ip[0] * ip[1]);
++      ip[2] = (unsigned long) capacity / (ip[0] * ip[1]);
        if (ip[2] > 1024) {
                ip[0] = 0xff;
                ip[1] = 0x3f;
-               ip[2] = (unsigned long)capacity / (ip[0] * ip[1]);
 -              ip[2] = (unsigned long) disk->capacity / (ip[0] * ip[1]);
++              ip[2] = (unsigned long) capacity / (ip[0] * ip[1]);
  #if 0
                if (ip[2] > 1023)
                        ip[2] = 1023;
index e1d67cca8cb7093d2f175c0a4d28b58c1bf8593b,5a02bed03c726e2c8fb9985ae6bfa353ed4db48c..39c74e28878be2af5dbd0a3cdea1011949c72d7f
@@@ -1,38 -1,31 +1,16 @@@
  #ifndef _QLOGICFAS_H
  #define _QLOGICFAS_H
  
- int qlogicfas_detect(Scsi_Host_Template * );
- const char * qlogicfas_info(struct Scsi_Host *);
- int qlogicfas_command(Scsi_Cmnd *);
- int qlogicfas_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
- int qlogicfas_abort(Scsi_Cmnd *);
- int qlogicfas_reset(Scsi_Cmnd *, unsigned int);
- int qlogicfas_biosparam(struct scsi_device *, struct block_device *,
-               sector_t, int[]);
- #ifndef NULL
- #define NULL (0)
- #endif
- #ifdef PCMCIA
- #define __QLINIT __devinit
- #else
- #define __QLINIT __init
- #endif
- #define QLOGICFAS {           \
-       detect:         qlogicfas_detect,       \
-       info:           qlogicfas_info,         \
-       command:        qlogicfas_command,      \
-       queuecommand:   qlogicfas_queuecommand, \
-       abort:          qlogicfas_abort,        \
-       reset:          qlogicfas_reset,        \
-       bios_param:     qlogicfas_biosparam,    \
-       can_queue:      0,                      \
-       this_id:        -1,                     \
-       sg_tablesize:   SG_ALL,                 \
-       cmd_per_lun:    1,                      \
-       use_clustering: DISABLE_CLUSTERING      \
+ static int qlogicfas_detect(Scsi_Host_Template * );
+ static const char * qlogicfas_info(struct Scsi_Host *);
+ static int qlogicfas_command(Scsi_Cmnd *);
+ static int qlogicfas_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
+ static int qlogicfas_abort(Scsi_Cmnd *);
+ static int qlogicfas_bus_reset(Scsi_Cmnd *);
+ static int qlogicfas_device_reset(Scsi_Cmnd *);
+ static int qlogicfas_host_reset(Scsi_Cmnd *);
 -static int qlogicfas_biosparam(Disk *, struct block_device *, int[]);
 -
 -#define QLOGICFAS {                                           \
 -      detect:                         qlogicfas_detect,       \
 -      info:                           qlogicfas_info,         \
 -      command:                        qlogicfas_command,      \
 -      queuecommand:                   qlogicfas_queuecommand, \
 -      eh_abort_handler:               qlogicfas_abort,        \
 -      eh_bus_reset_handler:           qlogicfas_bus_reset,    \
 -      eh_device_reset_handler:        qlogicfas_device_reset, \
 -      eh_host_reset_handler:          qlogicfas_host_reset,   \
 -      bios_param:     qlogicfas_biosparam,                    \
 -      can_queue:      0,                                      \
 -      this_id:        -1,                                     \
 -      sg_tablesize:   SG_ALL,                                 \
 -      cmd_per_lun:    1,                                      \
 -      use_clustering: DISABLE_CLUSTERING                      \
++static int qlogicfas_biosparam(struct scsi_disk *, struct block_device *,
++                             sector_t, int[]);
  }
  
  #endif /* _QLOGICFAS_H */
Simple merge
index 68cc609f4ec1abbf3d1c3f7483080cb9bce3ed31,f93efa121ad692fb66a9cb2d08046ad456a8a170..6353641c4556eb6c985fbfa6bd71203c7b3dbb27
@@@ -820,12 -828,19 +827,21 @@@ static int sym53c416_host_reset(Scsi_Cm
        outb(NOOP | PIO_MODE, base + COMMAND_REG);
        outb(RESET_SCSI_BUS, base + COMMAND_REG);
        sym53c416_init(base, scsi_id);
-       return SCSI_RESET_PENDING;
+       return SUCCESS;
+ }
+ static int sym53c416_release(struct Scsi_Host *shost)
+ {
+       if (shost->irq)
+               free_irq(shost->irq, shost);
+       if (shost->io_port && shost->n_io_port)
+               release_region(shost->io_port, shost->n_io_port);
+       return 0;
  }
  
 -static int sym53c416_bios_param(Disk *disk, struct block_device *dev, int *ip)
 +static int sym53c416_bios_param(struct scsi_device *sdev,
 +              struct block_device *dev,
 +              sector_t capacity, int *ip)
  {
        int size;
  
index b331f4551d1de4fb0f1b87f3762315f54e03d89e,ab73d7ee9f8266b225ddb4c2aa4f121843a92f40..97eb87177321042fc65f3bca20c83ccf9ce5a7ea
@@@ -35,26 -36,30 +36,31 @@@ static int sym53c416_release(struct Scs
  static int sym53c416_command(Scsi_Cmnd *);
  static int sym53c416_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
  static int sym53c416_abort(Scsi_Cmnd *);
- static int sym53c416_reset(Scsi_Cmnd *, unsigned int);
+ static int sym53c416_host_reset(Scsi_Cmnd *);
+ static int sym53c416_bus_reset(Scsi_Cmnd *);
+ static int sym53c416_device_reset(Scsi_Cmnd *);
 -static int sym53c416_bios_param(Disk *, struct block_device *, int *);
 +static int sym53c416_bios_param(struct scsi_device *, struct block_device *,
 +              sector_t, int *);
  static void sym53c416_setup(char *str, int *ints);
  
- #define SYM53C416 {                                          \
-                   proc_name:         "sym53c416",   \
-                   name:              "Symbios Logic 53c416", \
-                   detect:            sym53c416_detect,       \
-                   info:              sym53c416_info,         \
-                   command:           sym53c416_command,      \
-                   queuecommand:      sym53c416_queuecommand, \
-                   abort:             sym53c416_abort,        \
-                   reset:             sym53c416_reset,        \
-                   bios_param:        sym53c416_bios_param,   \
-                   can_queue:         1,                      \
-                   this_id:           SYM53C416_SCSI_ID,      \
-                   sg_tablesize:      32,                     \
-                   cmd_per_lun:       1,                      \
-                   unchecked_isa_dma: 1,                      \
-                   use_clustering:    ENABLE_CLUSTERING       \
-                   }
+ #define SYM53C416 {                                           \
+               .proc_name =            "sym53c416",            \
+               .name =                 "Symbios Logic 53c416", \
+               .detect =               sym53c416_detect,       \
+               .info =                 sym53c416_info,         \
+               .command =              sym53c416_command,      \
+               .queuecommand =         sym53c416_queuecommand, \
+               .eh_abort_handler =     sym53c416_abort,        \
+               .eh_host_reset_handler =sym53c416_host_reset,   \
+               .eh_bus_reset_handler = sym53c416_bus_reset,    \
+               .eh_device_reset_handler =sym53c416_device_reset,\
+               .release =              sym53c416_release,      \
+               .bios_param =           sym53c416_bios_param,   \
+               .can_queue =            1,                      \
+               .this_id =              SYM53C416_SCSI_ID,      \
+               .sg_tablesize =         32,                     \
+               .cmd_per_lun =          1,                      \
+               .unchecked_isa_dma =    1,                      \
+               .use_clustering =       ENABLE_CLUSTERING       \
+               }
  #endif
Simple merge
index 840d5e4d9ee44ca6eff6ccf4b3ca28ca204fb77f,cd243b4c214f06c6379300dfdf888c58fc2b2d1a..dd0b0c01362b9d8511fb6282780c49f8e6fc181c
  #define T_DATA_REG_OFFSET     0x1e00  /* rw 512 bytes long */
  
  #ifndef ASM
- int t128_abort(Scsi_Cmnd *);
- int t128_biosparam(struct scsi_device *, struct block_device *,
-               sector_t, int*);
- int t128_detect(Scsi_Host_Template *);
- int t128_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
- int t128_host_reset(Scsi_Cmnd *);
- int t128_bus_reset(Scsi_Cmnd *);
- int t128_device_reset(Scsi_Cmnd *);
- int t128_proc_info (char *buffer, char **start, off_t offset,
+ static int t128_abort(Scsi_Cmnd *);
 -static int t128_biosparam(Disk *, struct block_device *, int*);
++static int t128_biosparam(struct scsi_device *, struct block_device *,
++                        sector_t, int*);
+ static int t128_detect(Scsi_Host_Template *);
+ static int t128_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
+ static int t128_host_reset(Scsi_Cmnd *);
+ static int t128_bus_reset(Scsi_Cmnd *);
+ static int t128_device_reset(Scsi_Cmnd *);
+ static int t128_proc_info (char *buffer, char **start, off_t offset,
                   int length, int hostno, int inout);
  
  #ifndef NULL
Simple merge
index 1a526242ed102b2826b697053c76023567df85dd,197958470758c9e00fcf026c4b3e16eb80ec9077..4e0a970826517fcaa9569e413259352567dc9213
@@@ -11,10 -11,9 +11,10 @@@ int u14_34f_release(struct Scsi_Host *)
  int u14_34f_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
  int u14_34f_abort(Scsi_Cmnd *);
  int u14_34f_reset(Scsi_Cmnd *);
 -int u14_34f_biosparam(Disk *, struct block_device *, int *);
 +int u14_34f_biosparam(struct scsi_device *, struct block_device *,
 +              sector_t, int *);
  
- #define U14_34F_VERSION "7.22.00"
+ #define U14_34F_VERSION "7.70.00"
  
  #define ULTRASTOR_14_34F {                                                   \
                  name:         "UltraStor 14F/34F rev. " U14_34F_VERSION " ", \
Simple merge
Simple merge