.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2010 FUJITSU LIMITED |
---|
3 | 4 | * Copyright (C) 2010 Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com> |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or modify |
---|
6 | | - * it under the terms of the GNU General Public License version 2 as |
---|
7 | | - * published by the Free Software Foundation. |
---|
8 | | - * |
---|
9 | | - * This program is distributed in the hope that it will be useful, |
---|
10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | | - * GNU General Public License for more details. |
---|
13 | | - * |
---|
14 | | - * You should have received a copy of the GNU General Public License |
---|
15 | | - * along with this program; if not, write to the Free Software |
---|
16 | | - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
17 | 5 | */ |
---|
18 | 6 | #include <linux/kernel.h> |
---|
19 | 7 | #include <linux/trace_seq.h> |
---|
.. | .. |
---|
30 | 18 | scsi_trace_rw6(struct trace_seq *p, unsigned char *cdb, int len) |
---|
31 | 19 | { |
---|
32 | 20 | const char *ret = trace_seq_buffer_ptr(p); |
---|
33 | | - u32 lba = 0, txlen; |
---|
| 21 | + u32 lba, txlen; |
---|
34 | 22 | |
---|
35 | | - lba |= ((cdb[1] & 0x1F) << 16); |
---|
36 | | - lba |= (cdb[2] << 8); |
---|
37 | | - lba |= cdb[3]; |
---|
| 23 | + lba = get_unaligned_be24(&cdb[1]) & 0x1fffff; |
---|
38 | 24 | /* |
---|
39 | 25 | * From SBC-2: a TRANSFER LENGTH field set to zero specifies that 256 |
---|
40 | 26 | * logical blocks shall be read (READ(6)) or written (WRITE(6)). |
---|