Lines 223-229
Link Here
|
223 |
hal_device_copy_property(parent, "scsi.lun", device, "storage.lun"); |
223 |
hal_device_copy_property(parent, "scsi.lun", device, "storage.lun"); |
224 |
/* do not stop here, in case it's an umass device */ |
224 |
/* do not stop here, in case it's an umass device */ |
225 |
} |
225 |
} |
226 |
else if (! strcmp(bus, "usb")) |
226 |
else if (hal_device_has_property(parent, "scsi_host.freebsd.driver") && ! strcmp(hal_device_property_get_string(parent, "scsi_host.freebsd.driver"), "umass")) |
227 |
{ |
227 |
{ |
228 |
hal_device_property_set_string(device, "storage.bus", "usb"); |
228 |
hal_device_property_set_string(device, "storage.bus", "usb"); |
229 |
hal_device_property_set_string(device, "storage.originating_device", hal_device_get_udi(parent)); |
229 |
hal_device_property_set_string(device, "storage.originating_device", hal_device_get_udi(parent)); |
Lines 301-307
Link Here
|
301 |
|
301 |
|
302 |
driver = hal_device_property_get_string(child, "freebsd.driver"); |
302 |
driver = hal_device_property_get_string(child, "freebsd.driver"); |
303 |
/* ATAPI devices: CD-ROM (acd), tape (ast) or floppy (afd) */ |
303 |
/* ATAPI devices: CD-ROM (acd), tape (ast) or floppy (afd) */ |
304 |
if (! driver || (strcmp(driver, "acd") && strcmp(driver, "ast") && strcmp(driver, "afd"))) |
304 |
if (! driver || (strcmp(driver, "acd") && strcmp(driver, "ast") && strcmp(driver, "afd") && strcmp(driver, "cd"))) |
305 |
continue; |
305 |
continue; |
306 |
|
306 |
|
307 |
phys_device = hal_device_property_get_string(child, "storage.originating_device"); |
307 |
phys_device = hal_device_property_get_string(child, "storage.originating_device"); |
Lines 508-513
Link Here
|
508 |
if (! parent || ! hal_device_property_get_bool(parent, "info.ignore")) |
508 |
if (! parent || ! hal_device_property_get_bool(parent, "info.ignore")) |
509 |
{ |
509 |
{ |
510 |
device = hf_scsi_bus_device_new(parent, match); |
510 |
device = hf_scsi_bus_device_new(parent, match); |
|
|
511 |
/* |
512 |
* Due to synchronization problems, the SCSI bus could be |
513 |
* created before the USB interface. Mark it as a USB mass |
514 |
* storage device to ensure it is detected as such. |
515 |
*/ |
516 |
if (! strcmp(match->dev_name, "umass-sim")) |
517 |
{ |
518 |
hal_device_property_set_string(device, "scsi_host.freebsd.driver", "umass"); |
519 |
hal_device_property_set_int(device, "scsi_host.freebsd.unit", match->unit_number); |
520 |
} |
511 |
hf_device_preprobe_and_add(device); |
521 |
hf_device_preprobe_and_add(device); |
512 |
} |
522 |
} |
513 |
} |
523 |
} |