Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127175
b: refs/heads/master
c: a5e6f64
h: refs/heads/master
i:
  127173: 2f6f8e5
  127171: f742081
  127167: d4851ba
v: v3
  • Loading branch information
Harvey Harrison authored and Stefan Richter committed Jan 4, 2009
1 parent 5641701 commit 120a4e8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 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: c816015860f6cfaf28c3cb95e3d3b6e4c4cfc688
refs/heads/master: a5e6f64ddad9f55f0eab09576c7523808d7f9e3d
10 changes: 5 additions & 5 deletions trunk/drivers/ieee1394/csr.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
#define CSR_MAX_ROM_SHIFT 8
#define CSR_GENERATION_SHIFT 4

#define CSR_SET_BUS_INFO_GENERATION(csr, gen) \
((csr)->bus_info_data[2] = \
cpu_to_be32((be32_to_cpu((csr)->bus_info_data[2]) & \
~(0xf << CSR_GENERATION_SHIFT)) | \
(gen) << CSR_GENERATION_SHIFT))
static inline void csr_set_bus_info_generation(struct csr1212_csr *csr, u8 gen)
{
csr->bus_info_data[2] &= ~cpu_to_be32(0xf << CSR_GENERATION_SHIFT);
csr->bus_info_data[2] |= cpu_to_be32((u32)gen << CSR_GENERATION_SHIFT);
}

struct csr_control {
spinlock_t lock;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/ieee1394/hosts.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ static void delayed_reset_bus(struct work_struct *work)
{
struct hpsb_host *host =
container_of(work, struct hpsb_host, delayed_reset.work);
int generation = host->csr.generation + 1;
u8 generation = host->csr.generation + 1;

/* The generation field rolls over to 2 rather than 0 per IEEE
* 1394a-2000. */
if (generation > 0xf || generation < 2)
generation = 2;

CSR_SET_BUS_INFO_GENERATION(host->csr.rom, generation);
csr_set_bus_info_generation(host->csr.rom, generation);
if (csr1212_generate_csr_image(host->csr.rom) != CSR1212_SUCCESS) {
/* CSR image creation failed.
* Reset generation field and do not issue a bus reset. */
CSR_SET_BUS_INFO_GENERATION(host->csr.rom,
csr_set_bus_info_generation(host->csr.rom,
host->csr.generation);
return;
}
Expand Down

0 comments on commit 120a4e8

Please sign in to comment.