Merge by hand (conflicts in sd.c)
authorJames Bottomley <jejb@titanic.(none)>
Tue, 6 Sep 2005 22:52:54 +0000 (17:52 -0500)
committerJames Bottomley <jejb@titanic.(none)>
Tue, 6 Sep 2005 22:52:54 +0000 (17:52 -0500)
1  2 
drivers/scsi/Kconfig
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/scsi_error.c
drivers/scsi/scsi_ioctl.c
drivers/scsi/sd.c
drivers/scsi/sg.c
drivers/scsi/st.c
include/scsi/scsi_eh.h

Simple merge
Simple merge
Simple merge
Simple merge
index 611ccde84778e03387cee06612c91d6911e1e782,41ba0809f7918aa859baa89f2fd152132a62e1b6..de564b386052a1c1c0015f76088c2f9db6fc529c
@@@ -969,10 -981,10 +969,10 @@@ static int media_not_present(struct scs
   * spinup disk - called only in sd_revalidate_disk()
   */
  static void
 -sd_spinup_disk(struct scsi_disk *sdkp, char *diskname,
 -             struct scsi_request *SRpnt, unsigned char *buffer) {
 +sd_spinup_disk(struct scsi_disk *sdkp, char *diskname)
 +{
        unsigned char cmd[10];
-       unsigned long spintime_value = 0;
+       unsigned long spintime_expire = 0;
        int retries, spintime;
        unsigned int the_result;
        struct scsi_sense_hdr sshdr;
                                cmd[1] = 1;     /* Return immediately */
                                memset((void *) &cmd[2], 0, 8);
                                cmd[4] = 1;     /* Start spin cycle */
 -                              SRpnt->sr_cmd_len = 0;
 -                              memset(SRpnt->sr_sense_buffer, 0,
 -                                      SCSI_SENSE_BUFFERSIZE);
 -
 -                              SRpnt->sr_data_direction = DMA_NONE;
 -                              scsi_wait_req(SRpnt, (void *)cmd, 
 -                                            (void *) buffer, 0/*512*/, 
 -                                            SD_TIMEOUT, SD_MAX_RETRIES);
 +                              scsi_execute_req(sdkp->device, cmd, DMA_NONE,
 +                                               NULL, 0, &sshdr,
 +                                               SD_TIMEOUT, SD_MAX_RETRIES);
-                               spintime_value = jiffies;
+                               spintime_expire = jiffies + 100 * HZ;
+                               spintime = 1;
                        }
-                       spintime = 1;
                        /* Wait 1 second for next try */
                        msleep(1000);
                        printk(".");
Simple merge
Simple merge
index b24d224281bd4705678f3d9efa44cde11ff3a918,4b71095be68149cdb71357519d1995bec43e0a82..fabd879c2f2e13e44f41a08083241fc6a20a6914
@@@ -26,18 -26,7 +26,15 @@@ struct scsi_sense_hdr {             /* See SPC-3 s
        u8 additional_length;   /* always 0 for fixed sense format */
  };
  
 +static inline int scsi_sense_valid(struct scsi_sense_hdr *sshdr)
 +{
 +      if (!sshdr)
 +              return 0;
 +
 +      return (sshdr->response_code & 0x70) == 0x70;
 +}
 +
  
- extern void scsi_add_timer(struct scsi_cmnd *, int,
-               void (*)(struct scsi_cmnd *));
- extern int scsi_delete_timer(struct scsi_cmnd *);
  extern void scsi_report_bus_reset(struct Scsi_Host *, int);
  extern void scsi_report_device_reset(struct Scsi_Host *, int, int);
  extern int scsi_block_when_processing_errors(struct scsi_device *);