patch-2.2.14 linux/drivers/scsi/esp.c
Next file: linux/drivers/scsi/fdomain.c
Previous file: linux/drivers/scsi/eata.h
Back to the patch index
Back to the overall index
- Lines: 47
- Date:
Tue Jan 4 10:12:20 2000
- Orig file:
v2.2.13/linux/drivers/scsi/esp.c
- Orig date:
Tue Jan 4 11:10:38 2000
diff -u --recursive --new-file v2.2.13/linux/drivers/scsi/esp.c linux/drivers/scsi/esp.c
@@ -1519,8 +1519,11 @@
*/
if((idprom->id_machtype == (SM_SUN4C | SM_4C_SS1)) ||
(idprom->id_machtype == (SM_SUN4C | SM_4C_SS1PLUS))) {
- /* But we are nice and allow tapes to disconnect. */
- if(SDptr->type == TYPE_TAPE)
+ /* But we are nice and allow tapes and removable
+ * disks (but not CDROMs) to disconnect.
+ */
+ if(SDptr->type == TYPE_TAPE ||
+ (SDptr->type != TYPE_ROM && SDptr->removable))
SDptr->disconnect = 1;
else
SDptr->disconnect = 0;
@@ -1538,7 +1541,8 @@
*/
if(esp->erev == fashme && !SDptr->wide) {
if(!SDptr->borken &&
- SDptr->type != TYPE_ROM) {
+ SDptr->type != TYPE_ROM &&
+ SDptr->removable == 0) {
build_wide_nego_msg(esp, 16);
SDptr->wide = 1;
esp->wnip = 1;
@@ -1556,6 +1560,11 @@
"CDROM.\n", esp->esp_id));
cdrom_hwbug_wkaround = 1;
build_sync_nego_msg(esp, 0, 0);
+ } else if (SDptr->removable != 0) {
+ ESPMISC(("esp%d: Not negotiating sync/wide but "
+ "allowing disconnect for removable media.\n",
+ esp->esp_id));
+ build_sync_nego_msg(esp, 0, 0);
} else {
build_sync_nego_msg(esp, esp->sync_defp, 15);
}
@@ -1589,7 +1598,9 @@
* Therefore _no_ disconnects for SCSI1 targets
* thank you very much. ;-)
*/
- if(((SDptr->scsi_level < 3) && (SDptr->type != TYPE_TAPE)) ||
+ if(((SDptr->scsi_level < 3) &&
+ (SDptr->type != TYPE_TAPE) &&
+ SDptr->removable == 0) ||
cdrom_hwbug_wkaround || SDptr->borken) {
ESPMISC((KERN_INFO "esp%d: Disabling DISCONNECT for target %d "
"lun %d\n", esp->esp_id, SCptr->target, SCptr->lun));
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)