Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151667336
D17857.id50053.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17857.id50053.diff
View Options
Index: sys/dev/cxgbe/t4_main.c
===================================================================
--- sys/dev/cxgbe/t4_main.c
+++ sys/dev/cxgbe/t4_main.c
@@ -522,9 +522,9 @@
static void setup_memwin(struct adapter *);
static void position_memwin(struct adapter *, int, uint32_t);
-static int validate_mem_range(struct adapter *, uint32_t, int);
+static int validate_mem_range(struct adapter *, uint32_t, uint32_t);
static int fwmtype_to_hwmtype(int);
-static int validate_mt_off_len(struct adapter *, int, uint32_t, int,
+static int validate_mt_off_len(struct adapter *, int, uint32_t, uint32_t,
uint32_t *);
static int fixup_devlog_params(struct adapter *);
static int cfg_itype_and_nqueues(struct adapter *, struct intrs_and_queues *);
@@ -2790,14 +2790,14 @@
* the card's address space.
*/
static int
-validate_mem_range(struct adapter *sc, uint32_t addr, int len)
+validate_mem_range(struct adapter *sc, uint32_t addr, uint32_t len)
{
struct t4_range mem_ranges[4], *r, *next;
uint32_t em, addr_len;
int i, n, remaining;
/* Memory can only be accessed in naturally aligned 4 byte units */
- if (addr & 3 || len & 3 || len <= 0)
+ if (addr & 3 || len & 3 || len == 0)
return (EINVAL);
/* Enabled memories */
@@ -2936,7 +2936,7 @@
* the start of the range is returned in addr.
*/
static int
-validate_mt_off_len(struct adapter *sc, int mtype, uint32_t off, int len,
+validate_mt_off_len(struct adapter *sc, int mtype, uint32_t off, uint32_t len,
uint32_t *addr)
{
uint32_t em, addr_len, maddr;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 9:33 PM (10 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31247249
Default Alt Text
D17857.id50053.diff (1 KB)
Attached To
Mode
D17857: Treat the memory lengths for CHELSIO_T4_GET_MEM as unsigned.
Attached
Detach File
Event Timeline
Log In to Comment