diff options
Diffstat (limited to 'drivers/scsi/scsi_scan.c')
| -rw-r--r-- | drivers/scsi/scsi_scan.c | 19 | 
1 files changed, 15 insertions, 4 deletions
| diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index f14945996ede..1a5474bd11a1 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
| @@ -673,6 +673,7 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags) | |||
| 673 | case TYPE_MEDIUM_CHANGER: | 673 | case TYPE_MEDIUM_CHANGER: | 
| 674 | case TYPE_ENCLOSURE: | 674 | case TYPE_ENCLOSURE: | 
| 675 | case TYPE_COMM: | 675 | case TYPE_COMM: | 
| 676 | case TYPE_RAID: | ||
| 676 | case TYPE_RBC: | 677 | case TYPE_RBC: | 
| 677 | sdev->writeable = 1; | 678 | sdev->writeable = 1; | 
| 678 | break; | 679 | break; | 
| @@ -738,6 +739,13 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags) | |||
| 738 | sdev->select_no_atn = 1; | 739 | sdev->select_no_atn = 1; | 
| 739 | 740 | ||
| 740 | /* | 741 | /* | 
| 742 | * Maximum 512 sector transfer length | ||
| 743 | * broken RA4x00 Compaq Disk Array | ||
| 744 | */ | ||
| 745 | if (*bflags & BLIST_MAX_512) | ||
| 746 | blk_queue_max_sectors(sdev->request_queue, 512); | ||
| 747 | |||
| 748 | /* | ||
| 741 | * Some devices may not want to have a start command automatically | 749 | * Some devices may not want to have a start command automatically | 
| 742 | * issued when a device is added. | 750 | * issued when a device is added. | 
| 743 | */ | 751 | */ | 
| @@ -1123,10 +1131,13 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags, | |||
| 1123 | * Also allow SCSI-2 if BLIST_REPORTLUN2 is set and host adapter does | 1131 | * Also allow SCSI-2 if BLIST_REPORTLUN2 is set and host adapter does | 
| 1124 | * support more than 8 LUNs. | 1132 | * support more than 8 LUNs. | 
| 1125 | */ | 1133 | */ | 
| 1126 | if ((bflags & BLIST_NOREPORTLUN) || | 1134 | if (bflags & BLIST_NOREPORTLUN) | 
| 1127 | starget->scsi_level < SCSI_2 || | 1135 | return 1; | 
| 1128 | (starget->scsi_level < SCSI_3 && | 1136 | if (starget->scsi_level < SCSI_2 && | 
| 1129 | (!(bflags & BLIST_REPORTLUN2) || shost->max_lun <= 8)) ) | 1137 | starget->scsi_level != SCSI_UNKNOWN) | 
| 1138 | return 1; | ||
| 1139 | if (starget->scsi_level < SCSI_3 && | ||
| 1140 | (!(bflags & BLIST_REPORTLUN2) || shost->max_lun <= 8)) | ||
| 1130 | return 1; | 1141 | return 1; | 
| 1131 | if (bflags & BLIST_NOLUN) | 1142 | if (bflags & BLIST_NOLUN) | 
| 1132 | return 0; | 1143 | return 0; | 
