Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343761
b: refs/heads/master
c: 5036f0a
h: refs/heads/master
i:
  343759: 768a775
v: v3
  • Loading branch information
Naresh Kumar Inna authored and James Bottomley committed Nov 30, 2012
1 parent 26a845b commit 5382fba
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 129 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: 68d91cbd5267e15a7c6da1415a1c65a9506aed96
refs/heads/master: 5036f0a0ecd31fc94360a944b352d082e1182b04
34 changes: 17 additions & 17 deletions trunk/drivers/scsi/csiostor/csio_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ csio_reg_rnode(struct csio_rnode *rn)
spin_unlock_irq(shost->host_lock);

sp = &rn->rn_sparm;
rport->maxframe_size = sp->csp.sp_bb_data;
rport->maxframe_size = ntohs(sp->csp.sp_bb_data);
if (ntohs(sp->clsp[2].cp_class) & FC_CPC_VALID)
rport->supported_classes = FC_COS_CLASS3;
else
Expand Down Expand Up @@ -192,7 +192,7 @@ csio_fchost_attr_init(struct csio_lnode *ln)
fc_host_supported_speeds(shost) = FC_PORTSPEED_10GBIT |
FC_PORTSPEED_1GBIT;

fc_host_maxframe_size(shost) = ln->ln_sparm.csp.sp_bb_data;
fc_host_maxframe_size(shost) = ntohs(ln->ln_sparm.csp.sp_bb_data);
memset(fc_host_supported_fc4s(shost), 0,
sizeof(fc_host_supported_fc4s(shost)));
fc_host_supported_fc4s(shost)[7] = 1;
Expand Down Expand Up @@ -325,23 +325,23 @@ csio_get_stats(struct Scsi_Host *shost)
memset(&fcoe_port_stats, 0, sizeof(struct fw_fcoe_port_stats));
csio_get_phy_port_stats(hw, ln->portid, &fcoe_port_stats);

fhs->tx_frames += (fcoe_port_stats.tx_bcast_frames +
fcoe_port_stats.tx_mcast_frames +
fcoe_port_stats.tx_ucast_frames +
fcoe_port_stats.tx_offload_frames);
fhs->tx_words += (fcoe_port_stats.tx_bcast_bytes +
fcoe_port_stats.tx_mcast_bytes +
fcoe_port_stats.tx_ucast_bytes +
fcoe_port_stats.tx_offload_bytes) /
fhs->tx_frames += (be64_to_cpu(fcoe_port_stats.tx_bcast_frames) +
be64_to_cpu(fcoe_port_stats.tx_mcast_frames) +
be64_to_cpu(fcoe_port_stats.tx_ucast_frames) +
be64_to_cpu(fcoe_port_stats.tx_offload_frames));
fhs->tx_words += (be64_to_cpu(fcoe_port_stats.tx_bcast_bytes) +
be64_to_cpu(fcoe_port_stats.tx_mcast_bytes) +
be64_to_cpu(fcoe_port_stats.tx_ucast_bytes) +
be64_to_cpu(fcoe_port_stats.tx_offload_bytes)) /
CSIO_WORD_TO_BYTE;
fhs->rx_frames += (fcoe_port_stats.rx_bcast_frames +
fcoe_port_stats.rx_mcast_frames +
fcoe_port_stats.rx_ucast_frames);
fhs->rx_words += (fcoe_port_stats.rx_bcast_bytes +
fcoe_port_stats.rx_mcast_bytes +
fcoe_port_stats.rx_ucast_bytes) /
fhs->rx_frames += (be64_to_cpu(fcoe_port_stats.rx_bcast_frames) +
be64_to_cpu(fcoe_port_stats.rx_mcast_frames) +
be64_to_cpu(fcoe_port_stats.rx_ucast_frames));
fhs->rx_words += (be64_to_cpu(fcoe_port_stats.rx_bcast_bytes) +
be64_to_cpu(fcoe_port_stats.rx_mcast_bytes) +
be64_to_cpu(fcoe_port_stats.rx_ucast_bytes)) /
CSIO_WORD_TO_BYTE;
fhs->error_frames += fcoe_port_stats.rx_err_frames;
fhs->error_frames += be64_to_cpu(fcoe_port_stats.rx_err_frames);
fhs->fcp_input_requests += ln->stats.n_input_requests;
fhs->fcp_output_requests += ln->stats.n_output_requests;
fhs->fcp_control_requests += ln->stats.n_control_requests;
Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/scsi/csiostor/csio_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ csio_set_reg_field(struct csio_hw *hw, uint32_t reg, uint32_t mask,
* is assigned the 64-bit ECC word for the read data.
*/
int
csio_hw_mc_read(struct csio_hw *hw, uint32_t addr, uint32_t *data,
csio_hw_mc_read(struct csio_hw *hw, uint32_t addr, __be32 *data,
uint64_t *ecc)
{
int i;
Expand Down Expand Up @@ -209,7 +209,7 @@ csio_hw_mc_read(struct csio_hw *hw, uint32_t addr, uint32_t *data,
* is assigned the 64-bit ECC word for the read data.
*/
int
csio_hw_edc_read(struct csio_hw *hw, int idx, uint32_t addr, uint32_t *data,
csio_hw_edc_read(struct csio_hw *hw, int idx, uint32_t addr, __be32 *data,
uint64_t *ecc)
{
int i;
Expand Down Expand Up @@ -249,7 +249,7 @@ csio_hw_edc_read(struct csio_hw *hw, int idx, uint32_t addr, uint32_t *data,
* address @addr.
*/
static int
csio_mem_win_rw(struct csio_hw *hw, u32 addr, __be32 *data, int dir)
csio_mem_win_rw(struct csio_hw *hw, u32 addr, u32 *data, int dir)
{
int i;

Expand Down Expand Up @@ -296,7 +296,7 @@ csio_memory_rw(struct csio_hw *hw, int mtype, u32 addr, u32 len,
{
uint32_t pos, start, end, offset, memoffset;
int ret;
__be32 *data;
uint32_t *data;

/*
* Argument sanity checks ...
Expand Down Expand Up @@ -379,7 +379,7 @@ csio_memory_rw(struct csio_hw *hw, int mtype, u32 addr, u32 len,
}

static int
csio_memory_write(struct csio_hw *hw, int mtype, u32 addr, u32 len, __be32 *buf)
csio_memory_write(struct csio_hw *hw, int mtype, u32 addr, u32 len, u32 *buf)
{
return csio_memory_rw(hw, mtype, addr, len, buf, 0);
}
Expand Down Expand Up @@ -429,6 +429,7 @@ csio_hw_seeprom_read(struct csio_hw *hw, uint32_t addr, uint32_t *data)

pci_read_config_dword(hw->pdev, base + PCI_VPD_DATA, data);
*data = le32_to_cpu(*data);

return 0;
}

Expand Down Expand Up @@ -926,7 +927,7 @@ csio_hw_fw_dload(struct csio_hw *hw, uint8_t *fw_data, uint32_t size)
int ret;
uint32_t i;
uint8_t first_page[SF_PAGE_SIZE];
const uint32_t *p = (const uint32_t *)fw_data;
const __be32 *p = (const __be32 *)fw_data;
struct fw_hdr *hdr = (struct fw_hdr *)fw_data;
uint32_t sf_sec_size;

Expand Down Expand Up @@ -2116,7 +2117,6 @@ csio_hw_flash_config(struct csio_hw *hw, u32 *fw_cfg_param, char *path)
const struct firmware *cf;
struct pci_dev *pci_dev = hw->pdev;
struct device *dev = &pci_dev->dev;

unsigned int mtype = 0, maddr = 0;
uint32_t *cfg_data;
int value_to_add = 0;
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/scsi/csiostor/csio_hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -658,10 +658,8 @@ void csio_intr_disable(struct csio_hw *, bool);
struct csio_lnode *csio_lnode_alloc(struct csio_hw *);
int csio_config_queues(struct csio_hw *);

int csio_hw_mc_read(struct csio_hw *, uint32_t,
uint32_t *, uint64_t *);
int csio_hw_edc_read(struct csio_hw *, int, uint32_t, uint32_t *,
uint64_t *);
int csio_hw_mc_read(struct csio_hw *, uint32_t, __be32 *, uint64_t *);
int csio_hw_edc_read(struct csio_hw *, int, uint32_t, __be32 *, uint64_t *);
int csio_hw_init(struct csio_hw *);
void csio_hw_exit(struct csio_hw *);
#endif /* ifndef __CSIO_HW_H__ */
Loading

0 comments on commit 5382fba

Please sign in to comment.