aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorBrian King <brking@us.ibm.com>2006-08-07 15:27:10 -0400
committerJeff Garzik <jeff@garzik.org>2006-08-09 00:08:38 -0400
commitb03732f006bd1ecee32587ec8235c41af5ad905f (patch)
tree19e1a4abab97cc476d66641bc1043640d61464db /drivers/scsi/libata-core.c
parentc256e95f7d602737e380f5f08666cc6a74023b4a (diff)
[PATCH] libata: Add ata_host_set_init
Add ata_host_set_init in preparation for SAS attached SATA. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 351544d3653a..886440b128a5 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -5351,6 +5351,28 @@ err_out:
5351} 5351}
5352 5352
5353/** 5353/**
5354 * ata_sas_host_init - Initialize a host_set struct
5355 * @host_set: host_set to initialize
5356 * @dev: device host_set is attached to
5357 * @flags: host_set flags
5358 * @ops: port_ops
5359 *
5360 * LOCKING:
5361 * PCI/etc. bus probe sem.
5362 *
5363 */
5364
5365void ata_host_set_init(struct ata_host_set *host_set,
5366 struct device *dev, unsigned long flags,
5367 const struct ata_port_operations *ops)
5368{
5369 spin_lock_init(&host_set->lock);
5370 host_set->dev = dev;
5371 host_set->flags = flags;
5372 host_set->ops = ops;
5373}
5374
5375/**
5354 * ata_device_add - Register hardware device with ATA and SCSI layers 5376 * ata_device_add - Register hardware device with ATA and SCSI layers
5355 * @ent: Probe information describing hardware device to be registered 5377 * @ent: Probe information describing hardware device to be registered
5356 * 5378 *
@@ -5381,15 +5403,12 @@ int ata_device_add(const struct ata_probe_ent *ent)
5381 (ent->n_ports * sizeof(void *)), GFP_KERNEL); 5403 (ent->n_ports * sizeof(void *)), GFP_KERNEL);
5382 if (!host_set) 5404 if (!host_set)
5383 return 0; 5405 return 0;
5384 spin_lock_init(&host_set->lock);
5385 5406
5386 host_set->dev = dev; 5407 ata_host_set_init(host_set, dev, ent->host_set_flags, ent->port_ops);
5387 host_set->n_ports = ent->n_ports; 5408 host_set->n_ports = ent->n_ports;
5388 host_set->irq = ent->irq; 5409 host_set->irq = ent->irq;
5389 host_set->mmio_base = ent->mmio_base; 5410 host_set->mmio_base = ent->mmio_base;
5390 host_set->private_data = ent->private_data; 5411 host_set->private_data = ent->private_data;
5391 host_set->ops = ent->port_ops;
5392 host_set->flags = ent->host_set_flags;
5393 5412
5394 /* register each port bound to this device */ 5413 /* register each port bound to this device */
5395 for (i = 0; i < ent->n_ports; i++) { 5414 for (i = 0; i < ent->n_ports; i++) {
@@ -5908,6 +5927,7 @@ EXPORT_SYMBOL_GPL(sata_deb_timing_hotplug);
5908EXPORT_SYMBOL_GPL(sata_deb_timing_long); 5927EXPORT_SYMBOL_GPL(sata_deb_timing_long);
5909EXPORT_SYMBOL_GPL(ata_std_bios_param); 5928EXPORT_SYMBOL_GPL(ata_std_bios_param);
5910EXPORT_SYMBOL_GPL(ata_std_ports); 5929EXPORT_SYMBOL_GPL(ata_std_ports);
5930EXPORT_SYMBOL_GPL(ata_host_set_init);
5911EXPORT_SYMBOL_GPL(ata_device_add); 5931EXPORT_SYMBOL_GPL(ata_device_add);
5912EXPORT_SYMBOL_GPL(ata_port_detach); 5932EXPORT_SYMBOL_GPL(ata_port_detach);
5913EXPORT_SYMBOL_GPL(ata_host_set_remove); 5933EXPORT_SYMBOL_GPL(ata_host_set_remove);