@@ -129,13 +129,13 @@ enum cksum_types obd_cksum_type_select(const char *obd_name,
#define DECLARE_CKSUM_NAME const char *const cksum_name[] = {"crc32", "adler", \
"crc32c", "reserved", "t10ip512", "t10ip4K", "t10crc512", "t10crc4K"}
-typedef u16 (obd_dif_csum_fn) (void *, unsigned int);
+typedef __be16 (obd_dif_csum_fn) (void *, unsigned int);
-u16 obd_dif_crc_fn(void *data, unsigned int len);
-u16 obd_dif_ip_fn(void *data, unsigned int len);
+__be16 obd_dif_crc_fn(void *data, unsigned int len);
+__be16 obd_dif_ip_fn(void *data, unsigned int len);
int obd_page_dif_generate_buffer(const char *obd_name, struct page *page,
u32 offset, u32 length,
- u16 *guard_start, int guard_number,
+ __be16 *guard_start, int guard_number,
int *used_number, int sector_size,
obd_dif_csum_fn *fn);
/*
@@ -32,13 +32,13 @@
#include <obd_class.h>
#include <obd_cksum.h>
-u16 obd_dif_crc_fn(void *data, unsigned int len)
+__be16 obd_dif_crc_fn(void *data, unsigned int len)
{
return cpu_to_be16(crc_t10dif(data, len));
}
EXPORT_SYMBOL(obd_dif_crc_fn);
-u16 obd_dif_ip_fn(void *data, unsigned int len)
+__be16 obd_dif_ip_fn(void *data, unsigned int len)
{
return ip_compute_csum(data, len);
}
@@ -46,14 +46,14 @@ EXPORT_SYMBOL(obd_dif_ip_fn);
int obd_page_dif_generate_buffer(const char *obd_name, struct page *page,
u32 offset, u32 length,
- u16 *guard_start, int guard_number,
+ __be16 *guard_start, int guard_number,
int *used_number, int sector_size,
obd_dif_csum_fn *fn)
{
unsigned int i = offset;
unsigned int end = offset + length;
char *data_buf;
- u16 *guard_buf = guard_start;
+ __be16 *guard_buf = guard_start;
unsigned int data_size;
int used = 0;
@@ -90,7 +90,7 @@ static int __obd_t10_performance_test(const char *obd_name,
unsigned int bufsize;
unsigned char *buffer;
struct page *__page;
- u16 *guard_start;
+ __be16 *guard_start;
int guard_number;
int used_number = 0;
int sector_size = 0;
@@ -117,7 +117,7 @@ static int __obd_t10_performance_test(const char *obd_name,
}
buffer = kmap(__page);
- guard_start = (u16 *)buffer;
+ guard_start = (__be16 *)buffer;
guard_number = PAGE_SIZE / sizeof(*guard_start);
for (i = 0; i < repeat_number; i++) {
/*
@@ -1196,7 +1196,7 @@ static int osc_checksum_bulk_t10pi(const char *obd_name, int nob,
unsigned char cfs_alg = cksum_obd2cfs(OBD_CKSUM_T10_TOP);
struct page *__page;
unsigned char *buffer;
- u16 *guard_start;
+ __be16 *guard_start;
unsigned int bufsize;
int guard_number;
int used_number = 0;
@@ -1220,7 +1220,7 @@ static int osc_checksum_bulk_t10pi(const char *obd_name, int nob,
}
buffer = kmap(__page);
- guard_start = (u16 *)buffer;
+ guard_start = (__be16 *)buffer;
guard_number = PAGE_SIZE / sizeof(*guard_start);
CDEBUG(D_PAGE | (resend ? D_HA : 0),
"GRD tags per page=%u, resend=%u, bytes=%u, pages=%zu\n",