From: Linus Torvalds Date: Tue, 16 Jun 2009 21:29:46 +0000 (-0700) Subject: Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394... X-Git-Tag: v2.6.31-rc1~301 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=f83b1e616f2f68b56b09b2f5116591981fee0c1c;hp=-c Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: firewire: core: use more outbound tlabels firewire: core: don't update Broadcast_Channel if RFC 2734 conditions aren't met firewire: core: prepare for non-core children of card devices firewire: core: include linux/uaccess.h instead of asm/uaccess.h firewire: add parent-of-unit accessor firewire: rename source files firewire: reorganize header files firewire: clean up includes firewire: ohci: access bus_seconds atomically firewire: also use vendor ID in root directory for driver matches firewire: share device ID table type with ieee1394 firewire: core: add sysfs attribute for easier udev rules firewire: core: check for missing struct update at build time, not run time firewire: core: improve check for local node --- f83b1e616f2f68b56b09b2f5116591981fee0c1c diff --combined drivers/firewire/sbp2.c index a70e66e78c7b,2353643721c1..24c45635376a --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c @@@ -30,18 -30,28 +30,28 @@@ #include #include + #include #include #include #include + #include + #include + #include + #include #include + #include + #include #include #include #include #include + #include + #include #include #include - #include #include + + #include #include #include @@@ -49,10 -59,6 +59,6 @@@ #include #include - #include "fw-device.h" - #include "fw-topology.h" - #include "fw-transaction.h" - /* * So far only bridges from Oxford Semiconductor are known to support * concurrent logins. Depending on firmware, four or two concurrent logins @@@ -174,6 -180,11 +180,11 @@@ struct sbp2_target int blocked; /* ditto */ }; + static struct fw_device *target_device(struct sbp2_target *tgt) + { + return fw_parent_device(tgt->unit); + } + /* Impossible login_id, to detect logout attempt before successful login */ #define INVALID_LOGIN_ID 0x10000 @@@ -482,7 -493,7 +493,7 @@@ static void complete_transaction(struc static void sbp2_send_orb(struct sbp2_orb *orb, struct sbp2_logical_unit *lu, int node_id, int generation, u64 offset) { - struct fw_device *device = fw_device(lu->tgt->unit->device.parent); + struct fw_device *device = target_device(lu->tgt); unsigned long flags; orb->pointer.high = 0; @@@ -504,7 -515,7 +515,7 @@@ static int sbp2_cancel_orbs(struct sbp2_logical_unit *lu) { - struct fw_device *device = fw_device(lu->tgt->unit->device.parent); + struct fw_device *device = target_device(lu->tgt); struct sbp2_orb *orb, *next; struct list_head list; unsigned long flags; @@@ -542,7 -553,7 +553,7 @@@ static int sbp2_send_management_orb(str int generation, int function, int lun_or_login_id, void *response) { - struct fw_device *device = fw_device(lu->tgt->unit->device.parent); + struct fw_device *device = target_device(lu->tgt); struct sbp2_management_orb *orb; unsigned int timeout; int retval = -ENOMEM; @@@ -638,7 -649,7 +649,7 @@@ static void sbp2_agent_reset(struct sbp2_logical_unit *lu) { - struct fw_device *device = fw_device(lu->tgt->unit->device.parent); + struct fw_device *device = target_device(lu->tgt); __be32 d = 0; fw_run_transaction(device->card, TCODE_WRITE_QUADLET_REQUEST, @@@ -655,7 -666,7 +666,7 @@@ static void complete_agent_reset_write_ static void sbp2_agent_reset_no_wait(struct sbp2_logical_unit *lu) { - struct fw_device *device = fw_device(lu->tgt->unit->device.parent); + struct fw_device *device = target_device(lu->tgt); struct fw_transaction *t; static __be32 d; @@@ -694,7 -705,7 +705,7 @@@ static inline void sbp2_allow_block(str static void sbp2_conditionally_block(struct sbp2_logical_unit *lu) { struct sbp2_target *tgt = lu->tgt; - struct fw_card *card = fw_device(tgt->unit->device.parent)->card; + struct fw_card *card = target_device(tgt)->card; struct Scsi_Host *shost = container_of((void *)tgt, struct Scsi_Host, hostdata[0]); unsigned long flags; @@@ -718,7 -729,7 +729,7 @@@ static void sbp2_conditionally_unblock(struct sbp2_logical_unit *lu) { struct sbp2_target *tgt = lu->tgt; - struct fw_card *card = fw_device(tgt->unit->device.parent)->card; + struct fw_card *card = target_device(tgt)->card; struct Scsi_Host *shost = container_of((void *)tgt, struct Scsi_Host, hostdata[0]); unsigned long flags; @@@ -743,7 -754,7 +754,7 @@@ */ static void sbp2_unblock(struct sbp2_target *tgt) { - struct fw_card *card = fw_device(tgt->unit->device.parent)->card; + struct fw_card *card = target_device(tgt)->card; struct Scsi_Host *shost = container_of((void *)tgt, struct Scsi_Host, hostdata[0]); unsigned long flags; @@@ -773,7 -784,7 +784,7 @@@ static void sbp2_release_target(struct struct Scsi_Host *shost = container_of((void *)tgt, struct Scsi_Host, hostdata[0]); struct scsi_device *sdev; - struct fw_device *device = fw_device(tgt->unit->device.parent); + struct fw_device *device = target_device(tgt); /* prevent deadlocks */ sbp2_unblock(tgt); @@@ -846,7 -857,7 +857,7 @@@ static void sbp2_queue_work(struct sbp2 */ static void sbp2_set_busy_timeout(struct sbp2_logical_unit *lu) { - struct fw_device *device = fw_device(lu->tgt->unit->device.parent); + struct fw_device *device = target_device(lu->tgt); __be32 d = cpu_to_be32(SBP2_CYCLE_LIMIT | SBP2_RETRY_LIMIT); fw_run_transaction(device->card, TCODE_WRITE_QUADLET_REQUEST, @@@ -862,7 -873,7 +873,7 @@@ static void sbp2_login(struct work_stru struct sbp2_logical_unit *lu = container_of(work, struct sbp2_logical_unit, work.work); struct sbp2_target *tgt = lu->tgt; - struct fw_device *device = fw_device(tgt->unit->device.parent); + struct fw_device *device = target_device(tgt); struct Scsi_Host *shost; struct scsi_device *sdev; struct sbp2_login_response response; @@@ -1110,7 -1121,7 +1121,7 @@@ static struct scsi_host_template scsi_d static int sbp2_probe(struct device *dev) { struct fw_unit *unit = fw_unit(dev); - struct fw_device *device = fw_device(unit->device.parent); + struct fw_device *device = fw_parent_device(unit); struct sbp2_target *tgt; struct sbp2_logical_unit *lu; struct Scsi_Host *shost; @@@ -1125,7 -1136,7 +1136,7 @@@ return -ENOMEM; tgt = (struct sbp2_target *)shost->hostdata; - unit->device.driver_data = tgt; + dev_set_drvdata(&unit->device, tgt); tgt->unit = unit; kref_init(&tgt->kref); INIT_LIST_HEAD(&tgt->lu_list); @@@ -1180,7 -1191,7 +1191,7 @@@ static int sbp2_remove(struct device *dev) { struct fw_unit *unit = fw_unit(dev); - struct sbp2_target *tgt = unit->device.driver_data; + struct sbp2_target *tgt = dev_get_drvdata(&unit->device); sbp2_target_put(tgt); return 0; @@@ -1191,7 -1202,7 +1202,7 @@@ static void sbp2_reconnect(struct work_ struct sbp2_logical_unit *lu = container_of(work, struct sbp2_logical_unit, work.work); struct sbp2_target *tgt = lu->tgt; - struct fw_device *device = fw_device(tgt->unit->device.parent); + struct fw_device *device = target_device(tgt); int generation, node_id, local_node_id; if (fw_device_is_shutdown(device)) @@@ -1240,10 -1251,10 +1251,10 @@@ static void sbp2_update(struct fw_unit *unit) { - struct sbp2_target *tgt = unit->device.driver_data; + struct sbp2_target *tgt = dev_get_drvdata(&unit->device); struct sbp2_logical_unit *lu; - fw_device_enable_phys_dma(fw_device(unit->device.parent)); + fw_device_enable_phys_dma(fw_parent_device(unit)); /* * Fw-core serializes sbp2_update() against sbp2_remove(). @@@ -1259,9 -1270,10 +1270,10 @@@ #define SBP2_UNIT_SPEC_ID_ENTRY 0x0000609e #define SBP2_SW_VERSION_ENTRY 0x00010483 - static const struct fw_device_id sbp2_id_table[] = { + static const struct ieee1394_device_id sbp2_id_table[] = { { - .match_flags = FW_MATCH_SPECIFIER_ID | FW_MATCH_VERSION, + .match_flags = IEEE1394_MATCH_SPECIFIER_ID | + IEEE1394_MATCH_VERSION, .specifier_id = SBP2_UNIT_SPEC_ID_ENTRY, .version = SBP2_SW_VERSION_ENTRY, }, @@@ -1335,7 -1347,7 +1347,7 @@@ static void complete_command_orb(struc { struct sbp2_command_orb *orb = container_of(base_orb, struct sbp2_command_orb, base); - struct fw_device *device = fw_device(orb->lu->tgt->unit->device.parent); + struct fw_device *device = target_device(orb->lu->tgt); int result; if (status != NULL) { @@@ -1442,7 -1454,7 +1454,7 @@@ static int sbp2_map_scatterlist(struct static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done) { struct sbp2_logical_unit *lu = cmd->device->hostdata; - struct fw_device *device = fw_device(lu->tgt->unit->device.parent); + struct fw_device *device = target_device(lu->tgt); struct sbp2_command_orb *orb; int generation, retval = SCSI_MLQUEUE_HOST_BUSY;