* struct p9_conn - fd mux connection state information
* @lock: protects mux_list (?)
* @mux_list: list link for mux to manage multiple connections (?)
- * @msize: maximum size for connection (dup)
- * @extended: 9p2000.u flag (dup)
* @client: reference to client instance for this connection
* @tagpool: id accounting for transactions
* @err: error state
struct p9_conn {
spinlock_t lock; /* protect lock structure */
struct list_head mux_list;
- int msize;
- unsigned char extended;
struct p9_client *client;
struct p9_idpool *tagpool;
int err;
spin_lock_init(&m->lock);
INIT_LIST_HEAD(&m->mux_list);
- m->msize = client->msize;
- m->extended = client->dotu;
m->client = client;
m->tagpool = p9_idpool_create();
if (IS_ERR(m->tagpool)) {
P9_DPRINTK(P9_DEBUG_MUX, "Rerror %.*s\n", ename->len,
ename->str);
- if (m->extended)
+ if (m->client->dotu)
req->err = -ecode;
if (!req->err) {
if (!m->rcall) {
m->rcall =
- kmalloc(sizeof(struct p9_fcall) + m->msize, GFP_KERNEL);
+ kmalloc(sizeof(struct p9_fcall) + m->client->msize,
+ GFP_KERNEL);
if (!m->rcall) {
err = -ENOMEM;
goto error;
}
clear_bit(Rpending, &m->wsched);
- err = p9_fd_read(m->client, m->rbuf + m->rpos, m->msize - m->rpos);
+ err = p9_fd_read(m->client, m->rbuf + m->rpos,
+ m->client->msize - m->rpos);
P9_DPRINTK(P9_DEBUG_MUX, "mux %p got %d bytes\n", m, err);
if (err == -EAGAIN) {
clear_bit(Rworksched, &m->wsched);
m->rpos += err;
while (m->rpos > 4) {
n = le32_to_cpu(*(__le32 *) m->rbuf);
- if (n >= m->msize) {
+ if (n >= m->client->msize) {
P9_DPRINTK(P9_DEBUG_ERROR,
"requested packet size too big: %d\n", n);
err = -EIO;
break;
err =
- p9_deserialize_fcall(m->rbuf, n, m->rcall, m->extended);
+ p9_deserialize_fcall(m->rbuf, n, m->rcall, m->client->dotu);
if (err < 0)
goto error;
char buf[150];
p9_printfcall(buf, sizeof(buf), m->rcall,
- m->extended);
+ m->client->dotu);
printk(KERN_NOTICE ">>> %p %s\n", m, buf);
}
#endif
rcall = m->rcall;
rbuf = m->rbuf;
if (m->rpos > n) {
- m->rcall = kmalloc(sizeof(struct p9_fcall) + m->msize,
- GFP_KERNEL);
+ m->rcall = kmalloc(sizeof(struct p9_fcall) +
+ m->client->msize, GFP_KERNEL);
if (!m->rcall) {
err = -ENOMEM;
goto error;
if ((p9_debug_level&P9_DEBUG_FCALL) == P9_DEBUG_FCALL) {
char buf[150];
- p9_printfcall(buf, sizeof(buf), tc, m->extended);
+ p9_printfcall(buf, sizeof(buf), tc, m->client->dotu);
printk(KERN_NOTICE "<<< %p %s\n", m, buf);
}
#endif