Project

General

Profile

Bug #9500

HP scanner needs smaller SMB2 rwsize

Added by Dan McDonald over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
cifs - CIFS server and client
Start date:
2018-04-25
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Multiple reports of HP scanners or all-in-ones that "scan to network disk" seem to fail with recent illumos builds.

This email thread details the symptoms, and a workaround using kmdb or /etc/system: https://illumos.topicbox.com/groups/developer/Tb306d72d143674f7-M22f50ecc1f5f7fe5a3c9c052

History

#1

Updated by Gordon Ross over 1 year ago

The max r/w size we report apparently confuses the (lame) scanner client
into trying to send writes larger than will fit in a NetBIOS frame.

I'd suggest, in smb2_negotiate_common, instead of directly using
smb2_max_rwsize, conditionally use a smaller value, i.e.
perhaps something like:

uint32_t max_rwsize;

/*
 * Some older clients are confused by large max_rwsize,
 * so if no CAP_LARGE_MTU lower it to 64k.
 */
max_rwsize = smb2_max_rwsize;
if ((s->capabilities & SMB2_CAP_LARGE_MTU) == 0)
    max_rwsize = (1 << 16);

Then use max_rwsize in the smb_mbc_encodef call.
#2

Updated by Electric Monk over 1 year ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit aa321b3cd36298fca4306c4e06284d250e998cf7

commit  aa321b3cd36298fca4306c4e06284d250e998cf7
Author: Dan McDonald <danmcd@joyent.com>
Date:   2018-05-01T18:39:17.000Z

    9500 HP scanner needs smaller SMB2 rwsize
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Reviewed by: Andy Fiddaman <omnios@citrus-it.net>
    Reviewed by: Bill Sommerfeld <sommerfeld@hamachi.org>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Also available in: Atom PDF