Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35371
b: refs/heads/master
c: b03732f
h: refs/heads/master
i:
  35369: 0f8659f
  35367: 02de5ec
v: v3
  • Loading branch information
Brian King authored and Jeff Garzik committed Aug 9, 2006
1 parent f82f165 commit c31ae06
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c256e95f7d602737e380f5f08666cc6a74023b4a
refs/heads/master: b03732f006bd1ecee32587ec8235c41af5ad905f
28 changes: 24 additions & 4 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5350,6 +5350,28 @@ static struct ata_port * ata_host_add(const struct ata_probe_ent *ent,
return NULL;
}

/**
* ata_sas_host_init - Initialize a host_set struct
* @host_set: host_set to initialize
* @dev: device host_set is attached to
* @flags: host_set flags
* @ops: port_ops
*
* LOCKING:
* PCI/etc. bus probe sem.
*
*/

void ata_host_set_init(struct ata_host_set *host_set,
struct device *dev, unsigned long flags,
const struct ata_port_operations *ops)
{
spin_lock_init(&host_set->lock);
host_set->dev = dev;
host_set->flags = flags;
host_set->ops = ops;
}

/**
* ata_device_add - Register hardware device with ATA and SCSI layers
* @ent: Probe information describing hardware device to be registered
Expand Down Expand Up @@ -5381,15 +5403,12 @@ int ata_device_add(const struct ata_probe_ent *ent)
(ent->n_ports * sizeof(void *)), GFP_KERNEL);
if (!host_set)
return 0;
spin_lock_init(&host_set->lock);

host_set->dev = dev;
ata_host_set_init(host_set, dev, ent->host_set_flags, ent->port_ops);
host_set->n_ports = ent->n_ports;
host_set->irq = ent->irq;
host_set->mmio_base = ent->mmio_base;
host_set->private_data = ent->private_data;
host_set->ops = ent->port_ops;
host_set->flags = ent->host_set_flags;

/* register each port bound to this device */
for (i = 0; i < ent->n_ports; i++) {
Expand Down Expand Up @@ -5908,6 +5927,7 @@ EXPORT_SYMBOL_GPL(sata_deb_timing_hotplug);
EXPORT_SYMBOL_GPL(sata_deb_timing_long);
EXPORT_SYMBOL_GPL(ata_std_bios_param);
EXPORT_SYMBOL_GPL(ata_std_ports);
EXPORT_SYMBOL_GPL(ata_host_set_init);
EXPORT_SYMBOL_GPL(ata_device_add);
EXPORT_SYMBOL_GPL(ata_port_detach);
EXPORT_SYMBOL_GPL(ata_host_set_remove);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,8 @@ extern int ata_pci_clear_simplex(struct pci_dev *pdev);
#endif /* CONFIG_PCI */
extern int ata_device_add(const struct ata_probe_ent *ent);
extern void ata_port_detach(struct ata_port *ap);
extern void ata_host_set_init(struct ata_host_set *, struct device *,
unsigned long, const struct ata_port_operations *);
extern void ata_host_set_remove(struct ata_host_set *host_set);
extern int ata_scsi_detect(struct scsi_host_template *sht);
extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
Expand Down

0 comments on commit c31ae06

Please sign in to comment.