diff options
author | Hiral Shah <hishah@cisco.com> | 2014-11-10 12:54:33 -0800 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-20 09:10:23 +0100 |
commit | 042b356a5fcf3c5a99c34208eefc572454a330bf (patch) | |
tree | 8fb22d977359820b024433d50ca04f9f29c230dd /drivers/scsi/fnic/fnic_trace.c | |
parent | a232bfbe195df4b85ff9e5876534fe4081d9fd9a (diff) | |
download | linux-042b356a5fcf3c5a99c34208eefc572454a330bf.tar.gz linux-042b356a5fcf3c5a99c34208eefc572454a330bf.tar.bz2 linux-042b356a5fcf3c5a99c34208eefc572454a330bf.zip |
Fnic: Memcopy only mimumum of data or trace buffer
In case of receive path, we do not have eth header or fcoe header available
when we take a trace so we fill the fc trace buffer with 0xff for both
values. We copy only mimimum of received data or trace buffer size -
fc header - eth and fcoe header
- Increment fnic version from 1.6.0.12 to 1.6.0.13
Signed-off-by: Hiral Shah <hishah@cisco.com>
Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com>
Signed-off-by: Anil Chintalapati <achintal@cisco.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/fnic/fnic_trace.c')
-rw-r--r-- | drivers/scsi/fnic/fnic_trace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/fnic/fnic_trace.c b/drivers/scsi/fnic/fnic_trace.c index acf1f95cb5c5..65a9bde26974 100644 --- a/drivers/scsi/fnic/fnic_trace.c +++ b/drivers/scsi/fnic/fnic_trace.c @@ -624,12 +624,12 @@ int fnic_fc_trace_set_data(u32 host_no, u8 frame_type, if (frame_type == FNIC_FC_RECV) { eth_fcoe_hdr_len = sizeof(struct ethhdr) + sizeof(struct fcoe_hdr); - fc_trc_frame_len = fc_trc_frame_len + eth_fcoe_hdr_len; memset((char *)fc_trace, 0xff, eth_fcoe_hdr_len); /* Copy the rest of data frame */ memcpy((char *)(fc_trace + eth_fcoe_hdr_len), (void *)frame, min_t(u8, fc_trc_frame_len, - (u8)(FC_TRC_SIZE_BYTES - FC_TRC_HEADER_SIZE))); + (u8)(FC_TRC_SIZE_BYTES - FC_TRC_HEADER_SIZE + - eth_fcoe_hdr_len))); } else { memcpy((char *)fc_trace, (void *)frame, min_t(u8, fc_trc_frame_len, |