Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] dpt_i2o: Add PROC_IA64 define
[SCSI] scsi_host regression: fix scsi host leak
[SCSI] sr: fix corrupt CD data after media change and delay

+12 -3
+2 -1
drivers/scsi/dpt/dptsig.h
··· 85 /* ------------------------------------------------------------------ */ 86 /* What type of processor the file is meant to run on. */ 87 /* This will let us know whether to read sigWORDs as high/low or low/high. */ 88 - #define PROC_INTEL 0x00 /* Intel 80x86 */ 89 #define PROC_MOTOROLA 0x01 /* Motorola 68K */ 90 #define PROC_MIPS4000 0x02 /* MIPS RISC 4000 */ 91 #define PROC_ALPHA 0x03 /* DEC Alpha */ ··· 104 #define PROC_486 0x08 /* Intel 80486 */ 105 #define PROC_PENTIUM 0x10 /* Intel 586 aka P5 aka Pentium */ 106 #define PROC_SEXIUM 0x20 /* Intel 686 aka P6 aka Pentium Pro or MMX */ 107 108 /* PROC_i960: */ 109 #define PROC_960RX 0x01 /* Intel 80960RC/RD */
··· 85 /* ------------------------------------------------------------------ */ 86 /* What type of processor the file is meant to run on. */ 87 /* This will let us know whether to read sigWORDs as high/low or low/high. */ 88 + #define PROC_INTEL 0x00 /* Intel 80x86/ia64 */ 89 #define PROC_MOTOROLA 0x01 /* Motorola 68K */ 90 #define PROC_MIPS4000 0x02 /* MIPS RISC 4000 */ 91 #define PROC_ALPHA 0x03 /* DEC Alpha */ ··· 104 #define PROC_486 0x08 /* Intel 80486 */ 105 #define PROC_PENTIUM 0x10 /* Intel 586 aka P5 aka Pentium */ 106 #define PROC_SEXIUM 0x20 /* Intel 686 aka P6 aka Pentium Pro or MMX */ 107 + #define PROC_IA64 0x40 /* Intel IA64 processor */ 108 109 /* PROC_i960: */ 110 #define PROC_960RX 0x01 /* Intel 80960RC/RD */
+7 -2
drivers/scsi/hosts.c
··· 456 * 457 * Return value: 458 * A pointer to located Scsi_Host or NULL. 459 **/ 460 struct Scsi_Host *scsi_host_lookup(unsigned short hostnum) 461 { ··· 467 struct Scsi_Host *shost = ERR_PTR(-ENXIO); 468 469 cdev = class_find_device(&shost_class, &hostnum, __scsi_host_match); 470 - if (cdev) 471 shost = scsi_host_get(class_to_shost(cdev)); 472 - 473 return shost; 474 } 475 EXPORT_SYMBOL(scsi_host_lookup);
··· 456 * 457 * Return value: 458 * A pointer to located Scsi_Host or NULL. 459 + * 460 + * The caller must do a scsi_host_put() to drop the reference 461 + * that scsi_host_get() took. The put_device() below dropped 462 + * the reference from class_find_device(). 463 **/ 464 struct Scsi_Host *scsi_host_lookup(unsigned short hostnum) 465 { ··· 463 struct Scsi_Host *shost = ERR_PTR(-ENXIO); 464 465 cdev = class_find_device(&shost_class, &hostnum, __scsi_host_match); 466 + if (cdev) { 467 shost = scsi_host_get(class_to_shost(cdev)); 468 + put_device(cdev); 469 + } 470 return shost; 471 } 472 EXPORT_SYMBOL(scsi_host_lookup);
+3
drivers/scsi/sr.c
··· 178 the_result = scsi_execute_req(sdev, cmd, DMA_NONE, NULL, 179 0, sshdr, SR_TIMEOUT, 180 retries--); 181 182 } while (retries > 0 && 183 (!scsi_status_is_good(the_result) ||
··· 178 the_result = scsi_execute_req(sdev, cmd, DMA_NONE, NULL, 179 0, sshdr, SR_TIMEOUT, 180 retries--); 181 + if (scsi_sense_valid(sshdr) && 182 + sshdr->sense_key == UNIT_ATTENTION) 183 + sdev->changed = 1; 184 185 } while (retries > 0 && 186 (!scsi_status_is_good(the_result) ||