Skip to contentSkip to conversation

cxgb3i -- get rid of GFP_NOFAIL

PATCH In review Karen Xie 1 participant 1 message Dec 7, 2008 SCSI

lore
Share & tools
lore

Karen Xie

author
#0 lore raw

PATCH 2/3 cxgb3i -- get rid of GFP_NOFAIL

[PATCH 2/3 2.6.29] cxgb3i -- get rid of GFP_NOFAIL

From: Karen Xie <[email protected]>

- get rid of GFP_NOFAIL in memory allocation calls
- move the port map to be per-adapter.
- fixed maximum number of skb frag calculations to be based on the sector size instead of page size.
- grouped related code together in functional blocks.
- added more connection states to better tracking the state transitions.
- added more comments

---

 drivers/scsi/cxgb3i/cxgb3i.h         |    2 
 drivers/scsi/cxgb3i/cxgb3i_init.c    |    2 
 drivers/scsi/cxgb3i/cxgb3i_iscsi.c   |    4 
 drivers/scsi/cxgb3i/cxgb3i_offload.c | 2549 ++++++++++++++++------------------
 drivers/scsi/cxgb3i/cxgb3i_offload.h |  247 ++-
 5 files changed, 1301 insertions(+), 1503 deletions(-)
drivers/scsi/cxgb3i/cxgb3i.h +1 -1
index 1c2301e..2d541a5 100644
@@ -86,7 +86,7 @@ struct cxgb3i_adapter {
  * struct cxgb3i_conn - cxgb3i iscsi connection
  *
  * @listhead:	list head to link elements
- * @conn:	pointer to iscsi_endpoint structure
+ * @cep:	pointer to iscsi_endpoint structure
  * @conn:	pointer to iscsi_conn structure
  * @hba:	pointer to the hba this conn. is going through
  * @task_idx_bits: # of bits needed for session->cmds_max
drivers/scsi/cxgb3i/cxgb3i_init.c +0 -2
index 236d5e1..6703682 100644
@@ -48,7 +48,6 @@ static void open_s3_dev(struct t3cdev *t3dev)
 		vers_printed = 1;
 	}
 
-	cxgb3i_log_debug("open cxgb3 %s.\n", t3dev->name);
 	cxgb3i_sdev_add(t3dev, &t3c_client);
 	cxgb3i_adapter_add(t3dev);
 }
@@ -59,7 +58,6 @@ static void open_s3_dev(struct t3cdev *t3dev)
  */
 static void close_s3_dev(struct t3cdev *t3dev)
 {
-	cxgb3i_log_debug("close cxgb3 %s.\n", t3dev->name);
 	cxgb3i_adapter_remove(t3dev);
 	cxgb3i_sdev_remove(t3dev);
 }
drivers/scsi/cxgb3i/cxgb3i_iscsi.c +2 -2
index 207c182..cf12eb1 100644
@@ -253,7 +253,7 @@ static struct iscsi_endpoint *cxgb3i_ep_connect(struct sockaddr *dst_addr,
 		cxgb3i_log_info("NOT going through cxgbi device.\n");
 		goto release_conn;
 	}
-	if (c3cn_in_state(c3cn, C3CN_STATE_CLOSE)) {
+	if (c3cn_is_closing(c3cn)) {
 		err = -ENOSPC;
 		cxgb3i_log_info("ep connect unable to connect.\n");
 		goto release_conn;
@@ -292,7 +292,7 @@ static int cxgb3i_ep_poll(struct iscsi_endpoint *ep, int timeout_ms)
 	struct cxgb3i_endpoint *cep = ep->dd_data;
 	struct s3_conn *c3cn = cep->c3cn;
 
-	if (!c3cn_in_state(c3cn, C3CN_STATE_ESTABLISHED))
+	if (!c3cn_is_established(c3cn))
 		return 0;
 	cxgb3i_api_debug("ep 0x%p, c3cn 0x%p established.\n", ep, c3cn);
 	return 1;
drivers/scsi/cxgb3i/cxgb3i_offload.c +1169 -1380

2,962 lines not on this page · raw message

drivers/scsi/cxgb3i/cxgb3i_offload.h +129 -118

247 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.