svn commit: r254137 - in projects/camlock/sys/cam: ata scsi
Alexander Motin
mav at FreeBSD.org
Fri Aug 9 09:48:06 UTC 2013
Author: mav
Date: Fri Aug 9 09:48:05 2013
New Revision: 254137
URL: http://svnweb.freebsd.org/changeset/base/254137
Log:
Remove xpt_compile_path() calls form (ata|scsi)_alloc_device().
That makes last lock-irrelevant by the price of that for some time till
probe start device will have protocol, etc. set to UNKNOWN, that is
hopefully not a problem.
Modified:
projects/camlock/sys/cam/ata/ata_xpt.c
projects/camlock/sys/cam/scsi/scsi_xpt.c
Modified: projects/camlock/sys/cam/ata/ata_xpt.c
==============================================================================
--- projects/camlock/sys/cam/ata/ata_xpt.c Fri Aug 9 09:34:11 2013 (r254136)
+++ projects/camlock/sys/cam/ata/ata_xpt.c Fri Aug 9 09:48:05 2013 (r254137)
@@ -249,6 +249,7 @@ proberegister(struct cam_periph *periph,
return (status);
}
CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe started\n"));
+ ata_device_transport(periph->path);
probeschedule(periph);
return(CAM_REQ_CMP);
}
@@ -1553,7 +1554,6 @@ xptscandone(struct cam_periph *periph, u
static struct cam_ed *
ata_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id)
{
- struct cam_path path;
struct ata_quirk_entry *quirk;
struct cam_ed *device;
@@ -1574,17 +1574,6 @@ ata_alloc_device(struct cam_eb *bus, str
device->queue_flags = 0;
device->serial_num = NULL;
device->serial_num_len = 0;
-
- if (lun_id != CAM_LUN_WILDCARD) {
- xpt_compile_path(&path,
- NULL,
- bus->path_id,
- target->target_id,
- lun_id);
- ata_device_transport(&path);
- xpt_release_path(&path);
- }
-
return (device);
}
Modified: projects/camlock/sys/cam/scsi/scsi_xpt.c
==============================================================================
--- projects/camlock/sys/cam/scsi/scsi_xpt.c Fri Aug 9 09:34:11 2013 (r254136)
+++ projects/camlock/sys/cam/scsi/scsi_xpt.c Fri Aug 9 09:48:05 2013 (r254137)
@@ -639,6 +639,7 @@ proberegister(struct cam_periph *periph,
return (status);
}
CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe started\n"));
+ scsi_devise_transport(periph->path);
/*
* Ensure we've waited at least a bus settle
@@ -2289,7 +2290,6 @@ xptscandone(struct cam_periph *periph, u
static struct cam_ed *
scsi_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id)
{
- struct cam_path path;
struct scsi_quirk_entry *quirk;
struct cam_ed *device;
@@ -2314,17 +2314,6 @@ scsi_alloc_device(struct cam_eb *bus, st
device->device_id_len = 0;
device->supported_vpds = NULL;
device->supported_vpds_len = 0;
-
- if (lun_id != CAM_LUN_WILDCARD) {
- xpt_compile_path(&path,
- NULL,
- bus->path_id,
- target->target_id,
- lun_id);
- scsi_devise_transport(&path);
- xpt_release_path(&path);
- }
-
return (device);
}
More information about the svn-src-projects
mailing list