Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356945
b: refs/heads/master
c: 1757d90
h: refs/heads/master
i:
  356943: 1bb12f3
v: v3
  • Loading branch information
David Milburn authored and Jeff Garzik committed Jan 14, 2013
1 parent 412824b commit a3f629f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 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: 25effc3647635b8775aefcfd884a359b9fa31e9d
refs/heads/master: 1757d902b029a29dfcef63609964385cf8865b5a
4 changes: 4 additions & 0 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ static void ata_dev_xfermask(struct ata_device *dev);
static unsigned long ata_dev_blacklisted(const struct ata_device *dev);

atomic_t ata_print_id = ATOMIC_INIT(0);
atomic_t host_print_id = ATOMIC_INIT(0);

struct ata_force_param {
const char *name;
Expand Down Expand Up @@ -6097,6 +6098,9 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
for (i = host->n_ports; host->ports[i]; i++)
kfree(host->ports[i]);

/* track host controller */
host->host_id = atomic_inc_return(&host_print_id);

/* give ports names and add SCSI hosts */
for (i = 0; i < host->n_ports; i++)
host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/libata-transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ int ata_tport_add(struct device *parent,

dev->parent = get_device(parent);
dev->release = ata_tport_release;
dev_set_name(dev, "ata%d", ap->print_id);
dev_set_name(dev, "ata%d.%d", ap->host->host_id, ap->print_id);
transport_setup_device(dev);
error = device_add(dev);
if (error) {
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ struct ata_host {
void *private_data;
struct ata_port_operations *ops;
unsigned long flags;
unsigned int host_id; /* user visible host ID */

struct mutex eh_mutex;
struct task_struct *eh_owner;
Expand Down

0 comments on commit a3f629f

Please sign in to comment.